Edit

kc3-lang/libevent/test

Branch :

  • Show log

    Commit

  • Author : Nick Mathewson
    Date : 2011-12-07 11:49:52
    Hash : 35c5c955
    Message : Bypass event_add when using event_base_once() for a 0-sec timeout Some people use event_base_once(EV_TIMEOUT) to make a callback get called "immediately". But this is pretty roundabout: it uses the timeout heap to immediately put the event onto the active queue, when it could just use event_active. Additionally, it can lead to surprising re-ordering behavior. This patch changes event_base_once so it bypasses event_add() and called event_active() directly on a pure-timeout event with an empty timeout.