I have a multi-threaded app where objects are enqueued by one thread and dequeued by the other (for sanity sake I'll call them the writer and reader threads).

The writer event is externally triggered and it is imperative that the trigger event is not delayed (which is why it is in its own thread).

There is an AutoResetEvent that is set to tell the reader thread that there are events to read. The problem is that if another writer event occurs while the reader is processing the queue it gives a System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

So - two questions:
(1) Is there a better architecture for this kind of situation
(2) If not, how do I prevent the error - i.e. how can the writer tell the reader to give is a rest for a while because more writing is going to be done?

(I could give code but it'd probably just confuse matters...)