The size of collection C(X) can be so much big, that we might be interested in isolate the elements that are temporarily ignored, in another collection. Further more, if all items are ignored, i am hoping that thread A blocks and not consume CPU for nothing. Finally, the rate of calls to NotifyIncludeAllElements can be so much high, that if we make a shared lock with thread A there, then the performance of processing of A is greatly affected. I tried to think about semaphore, signals, CAS operations, but came up with particular solution, you ca see it in this class I called AbstractDistributor : (Link to CodePlex) http://pushframework.codeplex.com/SourceControl/changeset/view/98598#1909758[^] When I think about the problem I can see many real world scenarios applicable to it. I am wondering if it is already solved in a good way.
Push Framework - now released ! http://www.pushframework.com