This page contains links and/or discussions related to multitasking/multithreading/parallelization in Lua.
- Standard Lua coroutines  - lightweight cooperative multitasking
- [Coco] (5.1) - true C coroutines for Lua (yield from anywhere)
- [tuna] (5.1/5.2) - cooperative C-level scheduler, in some ways like Coco. High memory efficiency. Win32 (Win64 soon) and Linux x86/64
- [Copas] (5.1/5.2/5.3) - a dispatcher based on coroutines and LuaSocket? that can be used by request/response servers.
- [LuaEvent] (5.1) - a binding to libevent, offers a coroutine dispatcher a-la Copas.
- [lua-ev] (5.1) - a binding to libev, still young.
- [luasched] (5.1) - collaborative multithreading, shared memory
- [Lumen] (5.1/5.2/LuaJIT) - pure-lua collaborative multithreading, shared memory, inspired in luasched.
- [cqueues] (LuaJIT, 5.2, 5.3) Coroutine scheduling using epoll, kqueue, and Solaris ports. No callbacks makes it interoperable with other event systems in C or Lua, as each cqueue scheduler provides a pollable descriptor. Includes light-weight condition variables for fast wakeup and switching among coroutines. Also includes bindings to non-blocking sockets, signaling, kernel-threading, and file change notifications. No dependencies except OpenSSL.
- [levent] (5.2/5.3) - lua concurrency library based on libev, similar with gevent.
- Preemptive, shared state:
- [LuaThread] (5.0/5.1) - threads share the same Lua state (synchronized); uses native OS threads (preemptive)
- Preemptive, message passing:
- [zmq.threads] - The [ZeroMQ] Lua bindings has a wrapper for [lua-llthreads] to add message passing support to lua-llthreads.
- [Lanes] (5.1/5.2) - completely separate Lua states, one per thread, with asynchronous message passing
- [LuaTask] (5.1) - multiple concurrent, independent Lua states, one per thread, with message passing
- [mqlua] (5.1/5.2) - MqLua - Run multiple Lua states in POSIX threads and use ZeroMQ for communication.
- [LuaExec] (5.1, 5.2, 5.3) - separate states, with asynchronous message passing based on abstract signals, recursive
- [cqueues.thread] (5.1, LuaJIT, 5.2, 5.3) - Separate states using pthreads, with non-blocking, coroutine-based I/O in each state. Similar to N:M threading, except no shared data between OS threads.
- Cooperative, message passing:
- Threading only on the C side:
- [Rings] - provides a way to create multiple communicating Lua states (doesn't in itself provide multithreading)
- [SMC] (5.?) - the State Machine Compiler, makes custom [FSM]-based dispatchers for Lua (among many other languages).
- [Miros] (5.1) - a Lua module that implements a Hierarchical State Machine ([HSM]) class (i.e. one that implements behavioral inheritance).
- [LuaGravity] - roughly based on Esterel and FrTime?, two synchronous reactive languages.
- [lua-zmq] - a binding to ZeroMQ, the high-performance message queue library with a socket-style API.
- [luaproxy] - spawn and access separate Lua states from within Lua.
A comparison of a number of Lua multithreading libraries is in [Lanes].
RecentChanges · preferences
edit · history
Last edited August 15, 2016 8:30 am GMT (diff)