Dispatch Queue (Godot 3) 0.3.2 Scripts 3.2 Community
Submitted by user gilzoide; CC0; 2024-05-21
Dispatch Queue implementation.
Supports synchronous and threaded execution, with the later being either serial (1 Thread) or concurrent (2+ Threads, a.k.a. Thread Pool).
If threading is not supported by OS, fallbacks to running in synchronous mode.
There are signals for when each task is finished and another for when all tasks are finished, so it's very easy to hook callbacks or yield until they are emitted.
You can also dispatch a group of tasks at once and respond to a signal when all of them are finished.
Dispatch queues are References, but there are Node and Resource wrappers for it to ease integrating with other nodes and scenes.
View files Download Submit an issue Recent Edits