[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Launching and controlling multiple lua scripts from Lua
- From: Jorge <xxopxe@...>
- Date: Fri, 31 Jan 2014 15:06:32 -0200
On 01/30/2014 05:15 PM, Milind Gupta wrote:
Hi,
I would like to launch multiple lua scripts, communicate with
them and pause or terminate them from within lua. Also I would want this
to be platform independent as much as possible.
I looked at multithreading libraries here
<http://lua-users.org/wiki/MultiTasking>. All need some OS support so I
am not sure if it will work even in systems like Android.
If you are okay with cooperative multitasking, a pure-Lua multitasking
environment is Lumen:
https://github.com/xopxe/Lumen
It allows to start/pause/kill tasks, and communicate with them using
signals (trough an API inspired in Mihini scheduler). You also have
pipes and streams for inter-task communications, and a few goodies like
a toy webserver (with websocket support), a remote Lua terminal, etc.
I made it and that all I can say as it's advantages/disadvantages :)
Jorge