Probably not out of the box but this is why I used an integer context id rather than a boolean marker: that should make it possible to scope the immutability assumption to a specific dispatch to a specific queue.

BTW I thought about how to implement the 'Grand Central Dispatch' with multiprocessing in python and it sounds complicated to me (unless you allow the size of the pool to grow). Otherwise you would need something like coroutines to pause the task execution when dependent subtasks are issued. That would probably involve a complex callback API. Otherwise one could adopt a cleaner API with generators ala tulip http://www.python.org/dev/peps/pep-3156/ .

Any way we can talk about that later.