Class TaskPool
Implements a shared, multi-threaded task pool.
Constructors
Name | Description |
this
(thread_count, thread_name_prefix)
|
Creates a new task pool with the specified number of threads.
|
Properties
Name | Type | Description |
threadCount [get]
|
ulong | Returns the number of worker threads.
|
Methods
Name | Description |
join
()
|
Instructs all worker threads to terminate as soon as all tasks have
been processed and waits for them to finish.
|
runTask
(func, args)
|
Runs a new asynchronous task in a worker thread.
|
runTaskDist
(func, args)
|
Runs a new asynchronous task in all worker threads concurrently.
|
runTaskDistH
(on_handle, func, args)
|
Runs a new asynchronous task in all worker threads and returns the handles.
|
runTaskH
(func, args)
|
Runs a new asynchronous task in a worker thread, returning the task handle.
|
terminate
()
|
Instructs all worker threads to terminate and waits until all have
finished.
|