Project

General

Profile

« Previous | Next » 

Revision 9c058270

Added by larskanis (Lars Kanis) about 4 years ago

Fix example fiber scheduler reg. writable events

There were two issues:

  1. When an IO object is waiting for writablility only (as in test_tcp_accept) the selected hash is empty.
    Therefore selected[fiber] returns nil but needs to default to 0 in order to be or'ed with IO::WRITABLE.

  2. When an IO object is waiting for read- or writability (as in test_tcp_connect), but only one of these
    two events arrive, the Fiber and IO object need to be removed from the other @readable or @writable list.