
2 Jun
2008
2 Jun
'08
6:07 p.m.
Johan Torp:
... The idea is to execute another task in the future::wait() call to avoid thread context switching and to need less worker threads. I've presented some arguments why this might cause unexpected problems.
It doesn't cause unexpected deadlocks if the thread is reused to execute the specific task that is supposed to produce the result of this particular future. Limiting the reuse to pool threads eliminates most other (theoretical IMO) problems.