On 11/22/2010 09:02 AM, Dhammika Pathirana wrote:

> I'm not sure, does this resolve the race condition?

The idea is:

1. When finalise function finds out that the initiation is over, it 
sends command to itself, saying "unplug the engine and send it to 
another thread".

2. The rest of the out_event executes.

3. The scheduler invokes processing of the event at this point. Thus, 
out_event is not on the stack anymore.

> Engine is not attached to a poller, how do we notify events?

Hard to say. Probably the easiest option would be to process any 
outstanding internal events on the object in a loop until there are no 
more available. Then return control to the scheduler (poller).

Martin
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to