Currently, tasks and futures both involve splitting an OS thread for parallel
execution. Although this is acceptable for the vast majority of situations,
it is suboptimal when tasks/futures are short-lived. The overhead of forking
a thread is substantial and will likely cause performance issues in heavily
parallel code. Therefore, we should implement support for thread pools that
wait for a task/future to fork, and execute them within the context of an
existing thread rather than spinning off a new one. Of course it is
imperative that the user have complete control over the pool size as well as
which tasks/futures are forked into new threads and which are delegated to a
pooled worker thread. Syntax for this is to be decided.
Original issue reported on code.google.com by don.ap...@gmail.com on 29 Nov 2009 at 5:00
Original issue reported on code.google.com by
don.ap...@gmail.com
on 29 Nov 2009 at 5:00