(CVI 5.5.1 on NT)
I have a case where I tried to use double locks to synchronize two threads (lock-step) during their initialization, but couldn't. For example, if I GetLock() from thread A, I can't use ReleaseLock() from thread B on the same lock. I can go to the WinSDK to get this capability, but I haven't needed the SDK for anything else, and I'm leary of mixing CVI locks & threads with those in the SDK.
Can I use ProcessSystemEvents(), or Sleep(0), with confidence to allow other ready threads to execute? This would be used between a ReleaseLock() and a GetLock() to ensure that another thread has been able to satisfy its own GetLock()?
This is a lame form of synchroniza
tion, but Locks don't seem to be real Mutex or Semaphore objects that can be managed across threads.
I am trying this because I can't use ConnectToTCPServer, and allow retries, from a thread that is not planning to 'own' the connection (previously posted question).
I may need to split up the process and use PostDeferredToThreadAndWait() instead.