aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/Threads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CommonLibs/Threads.cpp')
-rw-r--r--CommonLibs/Threads.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/CommonLibs/Threads.cpp b/CommonLibs/Threads.cpp
index 7cc8b92..de6520b 100644
--- a/CommonLibs/Threads.cpp
+++ b/CommonLibs/Threads.cpp
@@ -107,8 +107,9 @@ void Thread::start(void *(*task)(void*), void *arg)
{
assert(mThread==((pthread_t)0));
bool res;
- res = pthread_attr_init(&mAttrib);
- assert(!res);
+ // (pat) Moved initialization to constructor to avoid crash in destructor.
+ //res = pthread_attr_init(&mAttrib);
+ //assert(!res);
res = pthread_attr_setstacksize(&mAttrib, mStackSize);
assert(!res);
res = pthread_create(&mThread, &mAttrib, task, arg);