diff options
| author | 2011-01-13 11:59:13 -0800 | |
|---|---|---|
| committer | 2011-01-13 11:59:13 -0800 | |
| commit | a7196d2e83984a95bd29ea0d1f10c99778a5db19 (patch) | |
| tree | aed8e574d7e34e5ee80ad8389d32885ef650ffbd /libs/utils/Threads.cpp | |
| parent | e00b12aeeb2b8404b930ce5bc49fc6d925bad08c (diff) | |
| parent | 15025254eb81d0bbd513d823662d46cf6e57f538 (diff) | |
Merge "Fix issue 3302649." into honeycomb
Diffstat (limited to 'libs/utils/Threads.cpp')
| -rw-r--r-- | libs/utils/Threads.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index f6c55e4d89..ad9a94f594 100644 --- a/libs/utils/Threads.cpp +++ b/libs/utils/Threads.cpp @@ -774,6 +774,9 @@ int Thread::_threadLoop(void* user) self->mExitPending = true; self->mLock.lock(); self->mRunning = false; + // clear thread ID so that requestExitAndWait() does not exit if + // called by a new thread using the same thread ID as this one. + self->mThread = thread_id_t(-1); self->mThreadExitedCondition.broadcast(); self->mLock.unlock(); break; |