A simple, dependency-free coroutine-based multitasking environment for Lua, featuring a scheduler, signals, pipes, and mutexes.
Lumen is a Lua multitasking environment that provides a coroutine-based scheduler and communication primitives for building concurrent applications. It solves the problem of coordinating multiple tasks in Lua without relying on external dependencies or C extensions, offering a pure-Lua solution that works across Lua 5.1, 5.2, and LuaJIT.
Lua developers building concurrent or networked applications, such as game servers, IoT systems, or embedded scripting environments, who need lightweight multitasking without external dependencies.
Developers choose Lumen for its simplicity, portability, and dependency-free design, enabling easy integration into existing Lua projects while providing essential concurrency primitives like signals, pipes, and mutexes.
Lua Multitasking Environment.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Lumen has no external dependencies or C code, making it trivial to integrate into any Lua project without compilation or external library management, as stated in the README.
It runs on unmodified Lua 5.1, 5.2, and LuaJIT, ensuring compatibility across diverse environments, which aligns with its emphasis on portability.
The scheduler and communication primitives like signals and pipes are inspired by Sierra's scheduler, providing just enough abstraction to build concurrent apps without bloat, as shown in the simple example program.
Includes a remote Lua shell and lightweight HTTP server, offering ready-to-use modules for extended functionality without additional dependencies.
Tasks must explicitly yield control, which can lead to deadlocks or starvation if not meticulously managed, especially since mutexes are only needed when code relinquishes control, as noted in the README.
While tasks for LuaSocket and nixio are provided, it lacks built-in handling for other common I/O patterns, requiring developers to implement custom solutions for advanced asynchronous operations.
The API reference is online, but the README is brief with minimal examples, potentially steepening the learning curve for newcomers without extensive documentation or community tutorials.