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-05 years ago36,634 downloads
20200726.53-05 years ago38,689 downloads
20200726.52-05 years ago48,895 downloads
20200726.51-05 years ago684,979 downloads
20200603.53-05 years ago661 downloads
20200603.52-05 years ago368 downloads
20200603.51-05 years ago14,122 downloads
20190813.53-06 years ago3,625 downloads
20190813.52-06 years ago1,846 downloads
20190813.51-06 years ago71,201 downloads
20190731.53-06 years ago269 downloads
20190731.52-06 years ago1,776 downloads
20190731.51-06 years ago3,843 downloads
20171014.53-07 years ago5,506 downloads
20171014.52-07 years ago2,104 downloads
20171014.51-07 years ago63,211 downloads
20161215.53-08 years ago1,477 downloads
20161215.52-08 years ago977 downloads
20161215.51-08 years ago3,004 downloads
20161214.53-08 years ago127 downloads
20161214.52-08 years ago87 downloads
20161214.51-08 years ago309 downloads
20161018.53-08 years ago373 downloads
20161018.52-08 years ago298 downloads
20161018.51-08 years ago1,123 downloads
20160812.53-18 years ago103 downloads
20160812.53-09 years ago(revision: 2)224 downloads
20160812.52-18 years ago93 downloads
20160812.52-09 years ago(revision: 2)285 downloads
20160812.51-18 years ago162 downloads
20160812.51-09 years ago(revision: 2)650 downloads
20160808.53-09 years ago(revision: 2)69 downloads
20160808.52-09 years ago(revision: 2)82 downloads
20160808.51-09 years ago(revision: 2)123 downloads
20160316.53-09 years ago525 downloads
20160316.52-09 years ago511 downloads
20160316.51-09 years ago1,531 downloads
20150907.53-09 years ago356 downloads
20150907.52-09 years ago383 downloads
20150907.51-09 years ago1,177 downloads
20150119.53-110 years ago(revision: 2)58 downloads
20150119.53-010 years ago35 downloads
20150119.52-110 years ago53 downloads
20150119.52-010 years ago270 downloads
20150119.51-110 years ago(revision: 2)117 downloads
20150119.51-010 years ago215 downloads
scm-54dev5 years ago56 downloads
scm-53dev8 years ago(revision: 5)196 downloads
scm-52dev8 years ago(revision: 6)28,300 downloads
scm-51dev8 years ago(revision: 5)156 downloads

Dependencies

lua == 5.4

Dependency for

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

Labels

Manifests