I'd like to suggest two features:
1. There appears to be no way to wait for all currently scheduled tasks (spawned and enqueued). My task based application is supposed to quit as soon as (but not before) there are no more tasks available for execution. Currently I attach all tasks to one uber-root task and wait for this task to finish. This works up to the point where you want to use enqueue.
2. The only valid way to put a task to sleep and wait for a task-external event (e.g. a child task finishes) is to use some form of wait_for_all() which (presumably, the docu is sparse here) frees the current worker thread
to be used by other tasks until the waiting task continues in order to guarantee progress (otherwise, all worker threads might be blocked by tasks waiting on executable tasks which are not executed because all workers are blocked). Due to this very reason, it is not possible for a task to wait for any other external event using a custom wait function because the worker thread would be blocked (e.g. consumer-producer).
In the current tbb impl I would need to create my own worker thread for blocking tasks. To do this efficiently, I would create a thread pool etc, basically recreating lots of the tbb infra-structure.
The versatility of tbb tasks would be greatly enhanced if it was possible to use a mechanism similar to what wait_for_all() is doing when doing a custom wait.
If there is a decent chance for these changes to be accepted into the tbb codebase I would implement them myself. If not, I'll have to stick to my custom task scheduling system which is less portable and tested than tbb but doesn't impose these restrictions. Actually, it's a bit faster but portability would be worth it.