Re: eventAdd with zero delay?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 30 Jan 2013 19:23:55 +1300

On 30/01/2013 2:47 p.m., Rainer Weikusat wrote:
> What's the point of putting these onto the event queue? Wouldn't this
> be better done with something like this?

The Call queue and the Events queue are drained individually in
alternating fashion. The first 0-delay event will not run until after
the Call queue is empty.

The Call queue by design lacks anything similar to the 'heavy' event
loop exit point. So an explicit 0-delay event is used to break heavy
sequences of Calls into separate chains.

Using ScheduleCall immediately would be counter-productive in many of
these cases.
If you can identify 0-delay events which should actually be scheduled
immediately patches converting them to Call's are welcome.

Amos
Received on Wed Jan 30 2013 - 06:24:04 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 30 2013 - 12:00:08 MST