ExecutorNew
Creates and registers a new executor by name and type.
The return value is an BoxExecutor object that can be used to interact with the executor.
Available types are:
"cached" - Creates a cached thread pool executor.
"fixed" - Creates a fixed thread pool executor.
"fork_join" - Creates a fork join pool executor.
"scheduled" - Creates a scheduled thread pool executor.
"single" - Creates a single thread executor.
"virtual" - Creates a virtual thread executor.
"work_stealing" - Creates a work stealing thread pool executor.
Method Signature
ExecutorNew(name=[string], type=[string], maxThreads=[integer])Arguments
name
string
true
The name of the executor to create if not already created
type
string
true
The type of executor to create
maxThreads
integer
false
10
Examples
Create a new executor service
Result: myPool,FIXED
Available executor types
Result: truetruetrue
Cached thread pool (unbounded)
Result: CACHED
Related
Last updated
Was this helpful?
