mirror of
https://github.com/pocoproject/poco.git
synced 2025-06-01 21:03:39 +02:00
porting rev. 1915 from 1.4.4 branch (fixed SF# 3539695)
This commit is contained in:
parent
2adfe178c0
commit
4328b7cba3
@ -186,15 +186,20 @@ void ThreadImpl::startImpl(Runnable& target)
|
|||||||
if (_pData->stackSize != 0)
|
if (_pData->stackSize != 0)
|
||||||
{
|
{
|
||||||
if (0 != pthread_attr_setstacksize(&attributes, _pData->stackSize))
|
if (0 != pthread_attr_setstacksize(&attributes, _pData->stackSize))
|
||||||
|
{
|
||||||
|
pthread_attr_destroy(&attributes);
|
||||||
throw SystemException("cannot set thread stack size");
|
throw SystemException("cannot set thread stack size");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_pData->pRunnableTarget = ⌖
|
_pData->pRunnableTarget = ⌖
|
||||||
if (pthread_create(&_pData->thread, &attributes, runnableEntry, this))
|
if (pthread_create(&_pData->thread, &attributes, runnableEntry, this))
|
||||||
{
|
{
|
||||||
_pData->pRunnableTarget = 0;
|
_pData->pRunnableTarget = 0;
|
||||||
|
pthread_attr_destroy(&attributes);
|
||||||
throw SystemException("cannot start thread");
|
throw SystemException("cannot start thread");
|
||||||
}
|
}
|
||||||
|
pthread_attr_destroy(&attributes);
|
||||||
|
|
||||||
if (_pData->policy == SCHED_OTHER)
|
if (_pData->policy == SCHED_OTHER)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user