Invoke a single tasks
Invoke a single tasks
Invoke a batch of tasks
Invoke a batch of tasks
Invoke a batch of tasks and wait for all them finished
Invoke a batch of tasks and wait for all them finished
Use java future to execute the tasks.
Use java future to execute the tasks. It will be blocking until tasks completed. If any task throws an exception, it will throw that exception in caller.
return type of tasks
task sequence. each task's return type is T
the maximum time to wait
the time unit for the timeout
a sequence of Futures representing the tasks.
Set MKL thread pool size
Set MKL thread pool size
Set pool size
Set pool size
Wait for all the tasks in the wait queue finish
Wait for all the tasks in the wait queue finish
A thread pool wrapper, provide some helper functions for multi-threading
TODO
TreadPool
will give 2-version of thread pool, one uses scala version (invokeAndWait
), another is provided to Java (invokeAndWait2
). The design is weird. We should refactor this class later.