Liboop is a low-level event loop management library for POSIX-based operating systems. It supports the development of modular, multiplexed applications which may respond to events from several sources. It replaces the "select() loop" and allows the registration of event handlers for file and network I/O, timers and signals. Since processes use these mechanisms for almost all external communication, liboop can be used as the basis for almost any application.

Liboop is licensed under the Lesser General Public License.

Similar free software includes the GLib Main Event Loop, Niels Provos' libevent, and (for Perl) POE. Refer to the rationale for a detailed comparison.

Software which uses or supports liboop includes lsh, RULI, lyskom-server, Gale and GDN. (Let me know if I'm missing any.)


Get the latest version. Read the included INSTALL file.

You may also browse the Git repository for source code or documentation.


Extended rationale
Why everyone should be using liboop.
Introduction and overview
How liboop works; basic principles of operation.
Specific functions and data structures.


7 July 2010
Dan Egnor transfers maintainership of liboop to Niels Möller and Per Cederqvist. The repository is converted to Git. The web pages are currently available at
27 October 2003
Version 1.0 released. (The number has no special meaning, it's just the next increment.) The build is little more robust now, and you can enable and disable specific adapters in the configure script. The ADNS adapter returns error messages, the GLib adapter works with GLib 2, and there's a new oop_sys_run_once() function so you can poll an event source.

11 January 2003
Version 0.9 released. A memory leak when creating and destroying the system event source was fixed, the robustness of signal handling is improved, and some minor portability problems were fixed.

18 September 2001
Version 0.8 released, including a source adapter for Tcl/Tk. (0.7 was never announced.)

7 October 2000
Version 0.6 released, including a sink adapter for the GNU Readline Library.

5 September 1999
Version 0.4 released. Besides the usual bug fixes, the file descriptor deregistration interface changed, and we now have a source adapter for GLib, and a sink adapter for the W3C Protocol Library (libwww)! The test/sample program (test-oop) is also quite improved.

15 August 1999
Version 0.3 released. This version includes an adapter for Ian Jackson's asynchronous DNS resolver library.

Note that while liboop is covered by the lesser GPL, ADNS is covered by the full GPL, and therefore any program which uses ADNS with (or without) liboop must support distribution under the terms of the full GPL.

1 August 1999
Version 0.2 released. This release fixes several bugs, uses autoconf, automake and libtool, and includes an interface for using alternate memory allocation functions. Gale now uses liboop!

5 July 1999
Version 0.1 released. This is a very, very simple initial release that should nevertheless work as a functional event loop. No adapters are included yet. Testing is minimal, but give it a whirl!

Dan Egnor (egnor @