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

20200726.54-06 years ago51,013 downloads
20200726.53-06 years ago48,499 downloads
20200726.52-06 years ago55,564 downloads
20200726.51-06 years ago745,956 downloads
20200603.53-06 years ago667 downloads
20200603.52-06 years ago372 downloads
20200603.51-06 years ago14,128 downloads
20190813.53-07 years ago3,635 downloads
20190813.52-07 years ago1,850 downloads
20190813.51-07 years ago71,241 downloads
20190731.53-07 years ago274 downloads
20190731.52-07 years ago1,780 downloads
20190731.51-07 years ago3,850 downloads
20171014.53-08 years ago5,525 downloads
20171014.52-08 years ago2,112 downloads
20171014.51-08 years ago65,935 downloads
20161215.53-09 years ago1,482 downloads
20161215.52-09 years ago981 downloads
20161215.51-09 years ago3,011 downloads
20161214.53-09 years ago137 downloads
20161214.52-09 years ago91 downloads
20161214.51-09 years ago459 downloads
20161018.53-09 years ago378 downloads
20161018.52-09 years ago302 downloads
20161018.51-09 years ago1,128 downloads
20160812.53-19 years ago109 downloads
20160812.53-010 years ago(revision: 2)229 downloads
20160812.52-19 years ago97 downloads
20160812.52-010 years ago(revision: 2)289 downloads
20160812.51-19 years ago168 downloads
20160812.51-010 years ago(revision: 2)654 downloads
20160808.53-010 years ago(revision: 2)76 downloads
20160808.52-010 years ago(revision: 2)1,488 downloads
20160808.51-010 years ago(revision: 2)1,481 downloads
20160316.53-010 years ago530 downloads
20160316.52-010 years ago521 downloads
20160316.51-010 years ago1,535 downloads
20150907.53-011 years ago361 downloads
20150907.52-011 years ago387 downloads
20150907.51-011 years ago1,181 downloads
20150119.53-111 years ago(revision: 2)63 downloads
20150119.53-011 years ago38 downloads
20150119.52-111 years ago57 downloads
20150119.52-011 years ago317 downloads
20150119.51-111 years ago(revision: 2)121 downloads
20150119.51-011 years ago269 downloads
scm-54dev6 years ago90 downloads
scm-53dev11 years ago(revision: 5)199 downloads
scm-52dev11 years ago(revision: 6)40,367 downloads
scm-51dev11 years ago(revision: 5)179 downloads

Dependencies

lua == 5.4

Dependency for

circle, cqueues-pgsql, daemonparts, diskqueue, hectorm-fork-http, http, http, importutils, l, lacord, lredis, lua-irc, luacord, prosody, prosody, quest, redis-client, t-mq-amqp, telegram, themoonlitknot, tulip, wch, web-driver, xcq-subprocess

Labels

Manifests