Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
![ExecPool hero image](https://img.godotassetlibrary.com/QzovcDEHG6EkLIbyXrYPYBI9LS86oSJ7IJZwqt6i-cM/rs:fit:1920:1080:0/g:no/aHR0cHM6Ly9naXRodWIuY29tL3o4MC9leGVjX3Bvb2wvcmF3L21haW4vaWNvbi5wbmc.webp)
Quick Information
![ExecPool icon image](https://img.godotassetlibrary.com/gSN1c7aZU2fySr4bJ_fhn-4mFen0M4F20fMhwssO2Vw/rs:fit:50:50:0/g:no/aHR0cHM6Ly9naXRodWIuY29tL3o4MC9leGVjX3Bvb2wvcmF3L21haW4vaWNvbi5wbmc.webp)
Thread pool for asynchronous tasks execution. It runs tasks in a number of parallel threads. On each task completion it calls a callback specified.One can specify how many threads to use or use the default number which is OS.get_processor_count()-1.Usage example: ExecPool.start( my_object, "method_to_call", "callback_name" ).See "res://addons/exec_pool/examples/exec_pool_example.tscn" example scene.
ExecPool
Gd-script ExecPool is made for asyncronous task execution.
You can limit number of threads it uses. The value is located in the resource file "res://addons/exec_pool/exec_pool_settings.tres" max_threads_qty. If the number is 0 or negative, OS.get_processors_numer() - 1 is used.
Typical usage
There are two options.
- Add ExecPool node to your scene tree.
- Or add ExecPool creation to "Project->Project Settings->AutoLoad".
There are 3 methods:
- ExecPool::start( object: Object, method_name: String, callback_name: String )
- ExecPool::start_with_arg( object: Object, method_name: String, callback_name: String, argument )
- ExecPool::start_with_args( object: Object, method_name: String, callback_name: String, arguments: Array )
for calling a method method_name in the object. After the method_name returns, the callback_name is called with the result returned by method_name. start_with_arg calls mathod method_name with an argument. "start_with_args" calls method method_name with an array of arguments.
See res://addons/exec_pool/examples/exec_pool_example.tscn for a usage example.
Thread pool for asynchronous tasks execution. It runs tasks in a number of parallel threads. On each task completion it calls a callback specified.
One can specify how many threads to use or use the default number which is OS.get_processor_count()-1.
Usage example: ExecPool.start( my_object, "method_to_call", "callback_name" ).
See "res://addons/exec_pool/examples/exec_pool_example.tscn" example scene.
Reviews
Quick Information
![ExecPool icon image](https://img.godotassetlibrary.com/gSN1c7aZU2fySr4bJ_fhn-4mFen0M4F20fMhwssO2Vw/rs:fit:50:50:0/g:no/aHR0cHM6Ly9naXRodWIuY29tL3o4MC9leGVjX3Bvb2wvcmF3L21haW4vaWNvbi5wbmc.webp)
Thread pool for asynchronous tasks execution. It runs tasks in a number of parallel threads. On each task completion it calls a callback specified.One can specify how many threads to use or use the default number which is OS.get_processor_count()-1.Usage example: ExecPool.start( my_object, "method_to_call", "callback_name" ).See "res://addons/exec_pool/examples/exec_pool_example.tscn" example scene.