mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
serialized access to startImpl() functions
This commit is contained in:
@@ -83,6 +83,8 @@ void ThreadImpl::setPriorityImpl(int prio)
|
||||
|
||||
void ThreadImpl::startImpl(Runnable& target)
|
||||
{
|
||||
Mutex::ScopedLock lock(_mutex);
|
||||
|
||||
if (isRunningImpl())
|
||||
throw SystemException("thread already running");
|
||||
|
||||
@@ -94,6 +96,8 @@ void ThreadImpl::startImpl(Runnable& target)
|
||||
|
||||
void ThreadImpl::startImpl(Callback target, void* pData)
|
||||
{
|
||||
Mutex::ScopedLock lock(_mutex);
|
||||
|
||||
if (isRunningImpl())
|
||||
throw SystemException("thread already running");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user