Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Lua
  3. luaproc

luaproc

NOASSERTIONC1.0-4

A concurrent programming library for Lua that enables parallel execution of Lua processes using message passing and POSIX threads.

GitHubGitHub
130 stars27 forks0 contributors

What is luaproc?

luaproc is a concurrent programming library for Lua that enables parallel execution of Lua code through Lua processes and message passing. It solves the limitation of Lua's native coroutines, which cannot run in parallel, by using system threads (workers) and communication channels for inter-process communication.

Target Audience

Lua developers and researchers needing parallel processing capabilities in Lua applications, such as those building concurrent systems, simulations, or performance-sensitive scripts.

Value Proposition

Developers choose luaproc because it provides a lightweight, message-passing concurrency model for Lua without shared data, reducing common concurrency issues like race conditions, while maintaining compatibility across Lua 5.1 to 5.3.

Overview

luaproc is a concurrent programming library for Lua

Use Cases

Best For

  • Adding parallel processing to Lua scripts that require performance improvements
  • Implementing concurrent simulations or models in Lua using message passing
  • Building actor-model systems in Lua with isolated processes
  • Researching concurrency patterns in Lua with POSIX thread integration
  • Extending Lua applications with true multithreading capabilities
  • Creating educational examples of concurrent programming in Lua

Not Ideal For

  • Applications requiring shared memory concurrency for high-speed data exchange
  • Real-time systems where process suspension during message passing causes unacceptable latency
  • Simple Lua scripts without parallelism needs, to avoid added complexity
  • Non-POSIX environments, as it relies on pthreads for system threads

Pros & Cons

Pros

True Parallel Execution

Uses POSIX threads to run Lua processes in parallel, overcoming Lua's native coroutine limitation that prevents parallel execution, as stated in the introduction.

Safe Message Passing

Implements the actor model with channels for communication, avoiding shared data and reducing race conditions, promoting safer concurrency as per the philosophy section.

Performance Optimization

Offers process recycling to reuse Lua states from finished processes, improving performance by reducing overhead, detailed in the recycling facility description.

Dynamic Resource Control

Allows adjustment of active worker threads via setnumworkers, enabling management of system resource usage based on load, as described in the API.

Cons

Limited Message Data Types

Only atomic Lua values (strings, numbers, booleans, nil) can be sent directly; complex types require encoding, adding overhead and complexity, as admitted in the message passing section.

Synchronous Send Bottlenecks

Sends are always synchronous, blocking processes until received, which can lead to performance issues and deadlocks if not carefully designed, per the API for luaproc.send.

Manual Channel Management

Channels must be explicitly created and destroyed, increasing boilerplate code and risk of errors like using destroyed channels, as noted in the channel management functions.

Frequently Asked Questions

Quick Stats

Stars130
Forks27
Contributors0
Open Issues1
Last commit9 years ago
CreatedSince 2010

Tags

#parallel-computing#concurrent-programming#multithreading#actor-model#lua-library#message-passing

Built With

P
POSIX-threads
L
Lua

Included in

Lua4.5k
Auto-fetched 18 hours ago

Related Projects

laneslanes

Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 to 5.5.

Stars536
Forks99
Last commit4 months ago
ConcurrentLuaConcurrentLua

Concurrency oriented programming in Lua

Stars162
Forks12
Last commit11 years ago
LumenLumen

Lua Multitasking Environment.

Stars161
Forks23
Last commit9 months ago
llthreadsllthreads

Low-Level threads(pthreads or WIN32 threads) for Lua.

Stars150
Forks35
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub