vibe.d beta banner
get vibe.d
0.8.4

Asynchronous I/O that doesn’t get in your way, written in D

Class TaskPool

Implements a shared, multi-threaded task pool.

class TaskPool ;

Constructors

NameDescription
this Creates a new task pool with the specified number of threads.

Properties

NameTypeDescription
threadCount[get] ulongReturns the number of worker threads.

Methods

NameDescription
join Instructs all worker threads to terminate as soon as all tasks have been processed and waits for them to finish.
runTask Runs a new asynchronous task in a worker thread.
runTaskDist Runs a new asynchronous task in all worker threads concurrently.
runTaskH 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.
Authors

Sönke Ludwig

Copyright

© 2012-2017 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.