diff options
Diffstat (limited to 'core/object/worker_thread_pool.h')
-rw-r--r-- | core/object/worker_thread_pool.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/object/worker_thread_pool.h b/core/object/worker_thread_pool.h index 6374dbe8c7..ba6efbb065 100644 --- a/core/object/worker_thread_pool.h +++ b/core/object/worker_thread_pool.h @@ -124,7 +124,10 @@ private: }; TightLocalVector<ThreadData> threads; - bool exit_threads = false; + enum Runlevel { + RUNLEVEL_NORMAL, + RUNLEVEL_EXIT, + } runlevel = RUNLEVEL_NORMAL; HashMap<Thread::ID, int> thread_ids; HashMap< @@ -193,6 +196,9 @@ private: void _wait_collaboratively(ThreadData *p_caller_pool_thread, Task *p_task); + void _switch_runlevel(Runlevel p_runlevel); + bool _handle_runlevel(); + #ifdef THREADS_ENABLED static uint32_t _thread_enter_unlock_allowance_zone(THREADING_NAMESPACE::unique_lock<THREADING_NAMESPACE::mutex> &p_ulock); #endif |