ocean.util.aio.AsyncIO

Module for doing non-blocking reads supported by threads.

This module contains AsyncIO definition. Intented usage of AsyncIO is to perform normally blocking IO calls (disk requests) in fiber-blocking manner.

Fiber wanting to perform a request should submit its request to AsyncIO using public interface, passing all the arguments normally used by the blocking call and JobNotification instance on which it will be blocked. After issuing the request, request will be put in the queue and the fiber will block immidiatelly, giving chance to other fibers to run.

In the background, fixed amount of worker threads are taking request from the queue, and performing it (using blocking call which will in turn block this thread). When finished, the worker thread will resume the blocked fiber, and block on the semaphore waiting for the next request.

Members

Classes

AsyncIO
class AsyncIO

Class implementing AsyncIO support.

Meta

License

Boost Software License Version 1.0. See LICENSE.txt for details.