> On Nov 17, 2016, at 16:38, Troy Cauble <
troyc...@gmail.com> wrote:
>
>
> But how cheap is spawning?
It's likely cheap enough. The overhead is something like two method calls and acquiring a semaphore, which, if uncontended, is also cheap.
Notice I didn't quantify that, because "cheap" is relative, and a lot depends on things like how frequently new items arrive in the queue, how long the tasks run, how often the pool is expected to be full, etc. If you're concerned, my best advice would be to measure the alternatives on the platform(s) you care about and make your decision based on that, taking into account the other factors as needed.