Your design is intriguing generalization of a pipline stage. If I understand your design correctly, a parallel stage can be viewed as "each item has a unique context" and a serial_in_order stage can be viewed as "each item has the same context". Your extension allows intermediate degrees of parallelism that map neatly to resource sharing.
The implementation would seem to be a variation on "class input_buffer" in pipeline.cpp, with some hashing involved, right?
It would be good if you could share your code. The contribution process is described here.
May you elaborate a bit more here?
If a task is spawned when contexts are ready, it does not mean that the task will be executed when contexts are ready. Consider, the contexts are ready, you spawn 2 independent tasks, when tasks executed they clash.
When contexts became non-ready?
Do you have a centralized container of contexts protected by a mutex, then for each token lock the mutex, observe states of interesting contexts, unlock the mutex, spawn a task if necessary?
Added: By the way we will not publish the demo app which for a reason was excluded from the contribution. Please ask the author for itssource.