The normal .NET collection types do not support this scenario.

Maybe some of the types in System.Collections.Concurrent will help with that.

However, what behaviour do you need exactly? What if thread A just finished iterating a millisecond before thread B adds another item?

If you want to make sure that all items are processed by thread A, maybe the best way to model your problem is with a MailboxProcessor.

By on 4/30/2011 1:53 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper