ocean.io.select.client.FiberSelectEvent

Custom event for use with fibers and epoll, allowing a process to be suspended until the event is triggered.

Usage example:

import ocean.io.select.client.FiberSelectEvent;
import ocean.io.select.EpollSelectDispatcher;

auto fiber = new MessageFiber(&coroutine);

auto epoll = new EpollSelectDispatcher;
auto event = new FiberSelectEvent(fiber, epoll);

// Fiber method
void coroutine ( )
{
    // Do something.

    // Wait on the event, suspends the fiber.
    event.wait();

    // When event.trigger is called (from elsewhere), the fiber is
    // resumed.
}

Members

Classes

FiberSelectEvent
class FiberSelectEvent

Fiber select event class

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).