>I have a program that runs a thread for each device under test (144) the
> program communicates to the Device Under Test (DUT) thru the serial port.
[quoted text clipped - 15 lines]
> used
> for personal gain. Thanks
Hi,
Using CreateEvent and WaitForSingleObject is a good approach.
create 1 event per mux bank, and then signal that event when appropriate.
All other threads are blocked when the active ones are running so priority
is not an issue.
if you want those threads to run at a higher priority you can slightly raise
the thread priority when you create the threads, but be careful with that as
it may make the system unresponsive, or slow to respond.
For shutting down your program you can use a global boolean that you set to
true when you are shutting down the software.
then signal all threads so they can gracefully shut down.
Another option would be to use Waitformultipleobjects to wait on the
hardware event and a shutdown event.

Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"