mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #108697 from clayjohn/pump-task
Ensure that threads only process one pump task
This commit is contained in:
commit
cfc58710b7
6 changed files with 71 additions and 17 deletions
|
@ -253,7 +253,7 @@ void RenderingServerDefault::init() {
|
|||
if (create_thread) {
|
||||
print_verbose("RenderingServerWrapMT: Starting render thread");
|
||||
DisplayServer::get_singleton()->release_rendering_thread();
|
||||
WorkerThreadPool::TaskID tid = WorkerThreadPool::get_singleton()->add_task(callable_mp(this, &RenderingServerDefault::_thread_loop), true);
|
||||
WorkerThreadPool::TaskID tid = WorkerThreadPool::get_singleton()->add_task(callable_mp(this, &RenderingServerDefault::_thread_loop), true, "Rendering Server pump task", true);
|
||||
command_queue.set_pump_task_id(tid);
|
||||
command_queue.push(this, &RenderingServerDefault::_assign_mt_ids, tid);
|
||||
command_queue.push_and_sync(this, &RenderingServerDefault::_init);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue