--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > At the moment, design is: thread is launched, and waits on event. > > When there's something to do (aka a com service to perform), main thread sets > up some stuff (mainly a pointer to a object that knows how to do that > service), sets the event that gets the worker thread out of its wait, and > then itself waits on another event.
Can every thread wait be a multi-event wait, where one of the events is always "die now" and which is set by the main thread. Could try the com clean up when die now received. My main in file just polls a global nThreads which threads increment when they start and decrement when they die. It would be cleaner to wait on all the outstanding thread handles, but I did not want to keep track of each handle from each file.runwait.
