06-11-2013 06:54 PM - edited 06-11-2013 07:00 PM
I'm afraid of your design (seems like you're making it way too complicated), but the following snapshot shows how to stop a FOR loop prematurely (or a WHILE loop) that is inside a consumer loop. This should stop your loop based on a new event (all your events must generate a new queue element for this to work - INCLUDING the STOP button in this case because otherwise your consumer loop will never know that a user has clicked on the stop button.)
Please design carefully.
-DP
06-11-2013 08:55 PM
2. Producer/Consumer architecture took slighlty longer time than just doing it with event structure. Is there a reason for this or is it just because it is parallel loops architecture.