[Twisted-Python] Async file I/O with Linux & Twisted

Itamar Shtull-Trauring itamar at itamarst.org
Thu Dec 20 15:36:47 EST 2007

> I'm pretty sure you are mistaken. As I understood, libevent provides a
> portable API on top of whatever async I/O mechanisms there are on the
> underlying system, selecting the best available implementation.
> For Linux, I believe this it currently uses epoll, kqueue on freebsd,
> or select() or poll() on older systems.

None of those are asynchronous IO. They allow efficient querying of
readability/writeability, typically used with *non-blocking* IO.

In design pattern language they are "reactors", whereas async IO would be
a "proactor." In API land you can tell the difference because with async
APIs you have a callback: Twisted's Protocol/Transport APIs usually
convert low-level change events (socket is readable) and non-blocking IO
(reading the socket) to high-level async callbacks (dataReceived called
with data).

More information about the Twisted-Python mailing list