Click here to Skip to main content
16,005,236 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow? Pin
marvinmichael20-Sep-07 18:23
marvinmichael20-Sep-07 18:23 
AnswerRe: how? Pin
Colin Angus Mackay20-Sep-07 23:05
Colin Angus Mackay20-Sep-07 23:05 
GeneralRe: how? Pin
Paul Conrad23-Sep-07 11:39
professionalPaul Conrad23-Sep-07 11:39 
QuestionWhat is .resx Pin
Widgets20-Sep-07 14:46
Widgets20-Sep-07 14:46 
AnswerRe: What is .resx Pin
Dave Kreskowiak20-Sep-07 15:00
mveDave Kreskowiak20-Sep-07 15:00 
GeneralRe: What is .resx Pin
Widgets21-Sep-07 15:01
Widgets21-Sep-07 15:01 
GeneralRe: What is .resx Pin
Dave Kreskowiak21-Sep-07 16:10
mveDave Kreskowiak21-Sep-07 16:10 
QuestionAsynchronous queue handling? Pin
Duncan Edwards Jones20-Sep-07 10:42
professionalDuncan Edwards Jones20-Sep-07 10:42 
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...)

'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd

AnswerRe: Asynchronous queue handling? Pin
Guffa20-Sep-07 11:15
Guffa20-Sep-07 11:15 
QuestionDynamic Images in a Grid Pin
cisco210320-Sep-07 4:52
cisco210320-Sep-07 4:52 
AnswerRe: Dynamic Images in a Grid Pin
Dave Kreskowiak20-Sep-07 6:20
mveDave Kreskowiak20-Sep-07 6:20 
QuestionHow to avoid flickering Pin
Kurian_Kurian20-Sep-07 4:23
Kurian_Kurian20-Sep-07 4:23 
AnswerRe: How to avoid flickering Pin
Dave Kreskowiak20-Sep-07 5:55
mveDave Kreskowiak20-Sep-07 5:55 
QuestionMDI Child changes size Pin
PabloGM20-Sep-07 4:02
PabloGM20-Sep-07 4:02 
AnswerRe: MDI Child changes size Pin
Dave Kreskowiak20-Sep-07 5:42
mveDave Kreskowiak20-Sep-07 5:42 
GeneralRe: MDI Child changes size Pin
PabloGM20-Sep-07 6:33
PabloGM20-Sep-07 6:33 
GeneralRe: MDI Child changes size Pin
Dave Kreskowiak20-Sep-07 7:31
mveDave Kreskowiak20-Sep-07 7:31 
GeneralRe: MDI Child changes size Pin
Dave Kreskowiak20-Sep-07 12:38
mveDave Kreskowiak20-Sep-07 12:38 
GeneralRe: MDI Child changes size Pin
PabloGM21-Sep-07 8:01
PabloGM21-Sep-07 8:01 
QuestionIm not sure what to call this, but i need help... Pin
alindsay8120-Sep-07 4:00
alindsay8120-Sep-07 4:00 
AnswerRe: Im not sure what to call this, but i need help... Pin
Tom Deketelaere20-Sep-07 5:17
professionalTom Deketelaere20-Sep-07 5:17 
GeneralRe: Im not sure what to call this, but i need help... Pin
Dave Kreskowiak20-Sep-07 5:31
mveDave Kreskowiak20-Sep-07 5:31 
GeneralRe: Im not sure what to call this, but i need help... Pin
Tom Deketelaere20-Sep-07 6:21
professionalTom Deketelaere20-Sep-07 6:21 
AnswerRe: Im not sure what to call this, but i need help... Pin
Dave Kreskowiak20-Sep-07 5:27
mveDave Kreskowiak20-Sep-07 5:27 
AnswerRe: Im not sure what to call this, but i need help... Pin
srone20-Sep-07 5:41
srone20-Sep-07 5:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.