
Dispatch Queue 1.1.0 Scripts 4.0 Community
Submitted by user gilzoide; CC0; 2025-05-12
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).
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 await until they are emitted.
Tasks can be prioritized by passing an optional integer priority to dispatch/dispatch_group methods. Lower priority tasks are executed first.
You can also dispatch a group of tasks at once and respond to a signal when all of them are finished.
Dispatch queues are RefCounted, but there are Node and Resource wrappers for it to easily integrate with other nodes and scenes.
View files Download Submit an issue Recent Edits