This page shall contain links and/or discussions related to multitasking/multithreading/parallelization[1] in Lua.
- Cooperative:
- Standard Lua coroutines [2] - 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) - 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.
- 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.
- [LuaLanes] (5.1) - 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
- Preemptive
- [lua-llthreads] - provides a very simple interface to pthreads. Each thread has an independent Lua state.
- [Lua/APR multithreading] - multiple concurrent, independent Lua states, one per OS thread. Uses Apache APR.
- Cooperative, message passing:
- [ConcurrentLua] (5.1) - implements Erlang-style concurrency for Lua ("share-nothing asynchronous message-passing model" implemented with coroutines extended with message-passing primitives and also supporting distributed programming)
- [luaproc] - for details, see: [Exploring Lua for Concurrent Programming] by Alexandre Skyrme, Noemi Rodriguez, and Roberto Ierusalimschy. [2008]
- Threading only on the C side:
- Other:
- [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[3], the high-performance message queue library with a socket-style API.
A comparison of a number of Lua multithreading libraries is in [Lanes].
RecentChanges · preferences
edit · history
Last edited January 31, 2012 3:19 am GMT (diff)