07-04-2006 02:37 AM
07-04-2006 03:23 AM
I've noticed this problem as well. Windows appears to have a feature that if you have more than one 'busy' thread of the same priority, one of the threads runs all the time and the others get no processor time at all.
Rather than using ProcessSystemEvents(), which might have undesirable side effects, I'd suggest you use a call to the Windows API function Sleep(), with a non-zero time (e.g. Sleep(5)). This will suspend the thread to allow the other thread to run without causing anything else to happen. Note that you should use Sleep() rather than the CVI function Delay(), which is a 'busy' wait (it does not suspend the thread).