mirror of https://gitee.com/bigwinds/arangodb
Set thread's state to `STOPPED` when the thread function finishes. (#8283)
This commit is contained in:
parent
8e814744a5
commit
bed5a5f9a2
|
@ -72,6 +72,7 @@ void Thread::startThread(void* arg) {
|
|||
// make sure we drop our reference when we are finished!
|
||||
auto guard = scopeGuard([ptr]() {
|
||||
LOCAL_THREAD_NAME = nullptr;
|
||||
ptr->_state.store(ThreadState::STOPPED);
|
||||
ptr->releaseRef();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue