Have a major issue, and cannot figure out the cause.
I've created a palette that controls several things, but ultimately connects to a Sql database with block information, etc.
When I close a document, the DocumentToBeDestroyed event fires, runs through the associated code without any errors, then hangs for more than 2 minutes (I timed it). This obviously would lead most users to assume the program has frozen. After the hang concludes, the DocumentDestroyed event fires and runs through it's associated code without any errors.
When I break the code in the middle of the hang, I get this message:
mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadaffinity, bool exitContext) + 0x14 bytes.
I understand the principle of threading, if not how to do it, do it seems to me that ACAD is running something behind the scenes between the two events that is taking a ridiculously long time.
Any explanation or help would be great.