mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-04 12:17:37 +01:00
- Queue a StopNotification for each thread in the TCPServerDispatcher thread pool. Otherwise, only one thread in the thread pool is terminated. Signed-off-by: Stephen Balousek <sbalousek@wickedloop.com>
This commit is contained in:
@@ -173,8 +173,11 @@ void TCPServerDispatcher::stop()
|
|||||||
FastMutex::ScopedLock lock(_mutex);
|
FastMutex::ScopedLock lock(_mutex);
|
||||||
_stopped = true;
|
_stopped = true;
|
||||||
_queue.clear();
|
_queue.clear();
|
||||||
|
for (int i = 0; i < _threadPool.allocated(); i++)
|
||||||
|
{
|
||||||
_queue.enqueueNotification(new StopNotification);
|
_queue.enqueueNotification(new StopNotification);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int TCPServerDispatcher::currentThreads() const
|
int TCPServerDispatcher::currentThreads() const
|
||||||
|
|||||||
Reference in New Issue
Block a user