There are enough use cases for both types of job that it's likely some users will want to use both. Before this PR, this required creating two ThreadPools, one for each mode. Now, you only need the one.
If you call run() without passing the new mode argument, it falls back to the pool's mode, just like before.
There are enough use cases for both types of job that it's likely some users will want to use both. Before this PR, this required creating two
ThreadPool
s, one for each mode. Now, you only need the one.If you call
run()
without passing the newmode
argument, it falls back to the pool'smode
, just like before.