Thread pool with a constant amount of threads. Threads in the pool will exist until the pool is explicitly shut down.
new(threadsCount:Int)
Create a new thread pool with threadsCount threads.
threadsCount
read onlywrite onlythreadsCount:Int
run(task:() ‑> Void):Void
Submit a task to run in a thread.
Throws an exception if the pool is shut down.
shutdown():Void
Initiates a shutdown. All previousely submitted tasks will be executed, but no new tasks will be accepted.
Multiple calls to this method have no effect.