title: Custom non-blocking operations in Python asyncio
body: <p>Currently, <a href="https://docs.python.org/3/library/asyncio-eventloop.html" rel="nofollow noreferrer">asyncio Event Loop</a> supports non-blocking work with network sockets, files, subprocesses, and signals. For other operations, documentations describes <a href="https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools" rel="nofollow noreferrer">executing code in thread or process pools</a>, but that seems much less efficient (threads vs coroutines).</p>
  
  <p>Is there a way to introduce additional <em>low-level</em> non-blocking operations, e.g. wrapping I/O-heavy library calls? What primitives must be implemented?</p>