cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.

$ luarocks install cqueues

cqueues is a type of event loop for Lua, except it's not a classic event loop. It doesn't use callbacks—neither as part of the API nor internally—but instead you communicate with an event controller by the yielding and resumption of Lua coroutines using objects that adhere to a simple interface.

cqueues are also stackable. Each instantiated cqueue is a pollable object which can be polled from another cqueue, or another event loop system entirely. The design is meant to be unintrusive, composable, and embeddable within existing applications—such as Apache or Nginx—or used standalone. It maintains no global state and never blocks your thread of execution.

cqueues includes a sockets library with DNS, buffering, end-of-line translation, SSL/TLS, and descriptor passing support builtin. Domain querying, connection establishment, and SSL negotiation are handled transparently as part of a state machine entered with every I/O operation, so users can read and write immediately upon instantiating the object, as if opening a regular file.

cqueues also includes modules for handling signals, threads, and file change notifications using native kernel facilities—such as signalfd on Linux, or Solaris PORT_SOURCE_FILE for file events—and accessible through easy to use interfaces which abstract the different kernel facilities.

Additional modules include a light-weight user-defined event system using the condition variable pattern, and a comprehensive interface for DNS querying.

Versions

20171014.53-035 days ago211 downloads
20171014.52-035 days ago104 downloads
20171014.51-035 days ago345 downloads
20161215.53-0336 days ago1,434 downloads
20161215.52-0336 days ago947 downloads
20161215.51-0336 days ago2,927 downloads
20161214.53-0337 days ago70 downloads
20161214.52-0337 days ago56 downloads
20161214.51-0337 days ago200 downloads
20161018.53-01 year ago339 downloads
20161018.52-01 year ago270 downloads
20161018.51-01 year ago1,082 downloads
20160812.53-11 year ago53 downloads
20160812.53-01 year ago189 downloads
20160812.52-11 year ago67 downloads
20160812.52-01 year ago259 downloads
20160812.51-11 year ago106 downloads
20160812.51-01 year ago611 downloads
20160808.53-01 year ago18 downloads
20160808.52-01 year ago18 downloads
20160808.51-01 year ago24 downloads
20160316.53-01 year ago490 downloads
20160316.52-01 year ago464 downloads
20160316.51-01 year ago1,488 downloads
20150907.53-02 years ago320 downloads
20150907.52-02 years ago355 downloads
20150907.51-02 years ago1,139 downloads
20150119.53-12 years ago23 downloads
20150119.53-02 years ago9 downloads
20150119.52-12 years ago27 downloads
20150119.52-02 years ago152 downloads
20150119.51-12 years ago75 downloads
20150119.51-02 years ago113 downloads
scm-53dev2 years ago2 downloads
scm-52dev2 years ago1 download
scm-51dev2 years ago1 download

Dependencies

lua == 5.3

Dependency for

cqueues-pgsql, http, l, lredis, prosody

Labels

Manifests