mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 01:16:55 +02:00
Race condition in ThreadPool #1906
This commit is contained in:
parent
6b19b56bd8
commit
5b91bc65b6
@ -192,10 +192,11 @@ void PooledThread::run()
|
|||||||
_mutex.lock();
|
_mutex.lock();
|
||||||
if (_pTarget) // a NULL target means kill yourself
|
if (_pTarget) // a NULL target means kill yourself
|
||||||
{
|
{
|
||||||
|
Runnable* pTarget = _pTarget;
|
||||||
_mutex.unlock();
|
_mutex.unlock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pTarget->run();
|
pTarget->run();
|
||||||
}
|
}
|
||||||
catch (Exception& exc)
|
catch (Exception& exc)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user