in reply to Re^2: loss of dll in a multi threaded app
in thread loss of dll in a multi threaded app

a trick would be to give each worker thread a shared "control" variable that is only used by that thread and the main thread. The main thread takes a lock on the variable, and the worker thread then tries to take a lock on it as well, which will block(put the thread to sleep) until the main thread uses cond_signal(part of threads::shared) to release the lock and hence wake up the worker thread. One might even configure said control variable to contain something useful, ie a filehandle that the worker thread needs to start working on.


Remember rule one...
  • Comment on Re^3: loss of dll in a multi threaded app