cygserver: raise number of worker threads on demand

The number of threads in the worker pool is fixed so far.  This is a
problem in XSI IPC scenarions with an unknown number of consumers.
It doesn't make sense to make the pool very big for a start, but when
the need arises, we need to make sure we can serve the request even if
all other worker threads are in a wait state.

This patch changes threaded_queue to just add another worker thread
if all current workers are busy.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2017-03-24 16:18:26 +01:00
parent 838eaf6674
commit 0b73dba4de
2 changed files with 11 additions and 12 deletions

View File

@ -49,6 +49,7 @@ public:
private:
LONG _workers_count;
LONG _workers_busy;
bool _running;
queue_submission_loop *_submitters_head;