You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment pause/resume synchronisation commands affect all thread pools. Someone issuing thpool_pause(thpool) will cause all thread pools to pause for example even if only one thread pool is passed as argument.
To work around this, all thread specific variables should be bundled inside the thread pool structure.
I see that thpool_resume() is global, but doesn't the pthread_kill(thpool_p->threads[n]->pthread, SIGUSR1) in thpool_pause() keep the pausing thread pool specific?
You're probably right. Not sure why I wrote that when I did. In any case this should be changed since it's not consistent.
As I see it either thpool_resume should resume only the given threadpool or in the short term it should be renamed to thpool_resume_all to make it clearer what's happening, and then it shouldn't take any arguments either since it acts on a global variable.
Resuming a single thread pool probably requires a bit more work; a variable on the thread pool itself instead of a global and then probably some thinking on how the signalling should work (thread_hold).
At the moment pause/resume synchronisation commands affect all thread pools. Someone issuing
thpool_pause(thpool)
will cause all thread pools to pause for example even if only one thread pool is passed as argument.To work around this, all thread specific variables should be bundled inside the thread pool structure.
(initial report: #11)
The text was updated successfully, but these errors were encountered: