#include "worker_thread_pool.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "core/os/safe_binary_mutex.h"
#include "core/os/thread_safe.h"
WorkerThreadPool::Task *const WorkerThreadPool::ThreadData::YIELDING = …;
void WorkerThreadPool::Task::free_template_userdata() { … }
WorkerThreadPool *WorkerThreadPool::singleton = …;
#ifdef THREADS_ENABLED
thread_local WorkerThreadPool::UnlockableLocks WorkerThreadPool::unlockable_locks[MAX_UNLOCKABLE_LOCKS];
#endif
void WorkerThreadPool::_process_task(Task *p_task) { … }
void WorkerThreadPool::_thread_function(void *p_user) { … }
void WorkerThreadPool::_post_tasks(Task **p_tasks, uint32_t p_count, bool p_high_priority, MutexLock<BinaryMutex> &p_lock) { … }
void WorkerThreadPool::_notify_threads(const ThreadData *p_current_thread_data, uint32_t p_process_count, uint32_t p_promote_count) { … }
bool WorkerThreadPool::_try_promote_low_priority_task() { … }
WorkerThreadPool::TaskID WorkerThreadPool::add_native_task(void (*p_func)(void *), void *p_userdata, bool p_high_priority, const String &p_description) { … }
WorkerThreadPool::TaskID WorkerThreadPool::_add_task(const Callable &p_callable, void (*p_func)(void *), void *p_userdata, BaseTemplateUserdata *p_template_userdata, bool p_high_priority, const String &p_description) { … }
WorkerThreadPool::TaskID WorkerThreadPool::add_task(const Callable &p_action, bool p_high_priority, const String &p_description) { … }
bool WorkerThreadPool::is_task_completed(TaskID p_task_id) const { … }
Error WorkerThreadPool::wait_for_task_completion(TaskID p_task_id) { … }
void WorkerThreadPool::_lock_unlockable_mutexes() { … }
void WorkerThreadPool::_unlock_unlockable_mutexes() { … }
void WorkerThreadPool::_wait_collaboratively(ThreadData *p_caller_pool_thread, Task *p_task) { … }
void WorkerThreadPool::_switch_runlevel(Runlevel p_runlevel) { … }
bool WorkerThreadPool::_handle_runlevel(ThreadData *p_thread_data, MutexLock<BinaryMutex> &p_lock) { … }
void WorkerThreadPool::yield() { … }
void WorkerThreadPool::notify_yield_over(TaskID p_task_id) { … }
WorkerThreadPool::GroupID WorkerThreadPool::_add_group_task(const Callable &p_callable, void (*p_func)(void *, uint32_t), void *p_userdata, BaseTemplateUserdata *p_template_userdata, int p_elements, int p_tasks, bool p_high_priority, const String &p_description) { … }
WorkerThreadPool::GroupID WorkerThreadPool::add_native_group_task(void (*p_func)(void *, uint32_t), void *p_userdata, int p_elements, int p_tasks, bool p_high_priority, const String &p_description) { … }
WorkerThreadPool::GroupID WorkerThreadPool::add_group_task(const Callable &p_action, int p_elements, int p_tasks, bool p_high_priority, const String &p_description) { … }
uint32_t WorkerThreadPool::get_group_processed_element_count(GroupID p_group) const { … }
bool WorkerThreadPool::is_group_task_completed(GroupID p_group) const { … }
void WorkerThreadPool::wait_for_group_task_completion(GroupID p_group) { … }
int WorkerThreadPool::get_thread_index() { … }
WorkerThreadPool::TaskID WorkerThreadPool::get_caller_task_id() { … }
#ifdef THREADS_ENABLED
uint32_t WorkerThreadPool::_thread_enter_unlock_allowance_zone(THREADING_NAMESPACE::unique_lock<THREADING_NAMESPACE::mutex> &p_ulock) { … }
void WorkerThreadPool::thread_exit_unlock_allowance_zone(uint32_t p_zone_id) { … }
#endif
void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio) { … }
void WorkerThreadPool::exit_languages_threads() { … }
void WorkerThreadPool::finish() { … }
void WorkerThreadPool::_bind_methods() { … }
WorkerThreadPool::WorkerThreadPool() { … }
WorkerThreadPool::~WorkerThreadPool() { … }