Thread pause and resume

Sean Kelly sean at invisibleduck.org
Mon Apr 6 10:45:26 PDT 2009


== Quote from Steve Teale (steve.teale at britseyeview.com)'s article
>
> In some code I wrote at that time, I had a worker thread pool. When a thread had done its job it would mark itself as available then
pause. The listener thread would then resume it or start one that had never been started. I'm trying to get it running in 2.26. There
are functions of the same name there but they are nested inside SuspendAll and ResumeAll, and so not accessible.

This sounds like a classic producer/consumer case.  I suggest using condition
variables (core.sync.condition with core.sync.mutex).



More information about the Digitalmars-d mailing list