[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Message passing in Lua
- From: Oliver <oschmidt-mailinglists@...>
- Date: Wed, 21 Apr 2021 09:53:01 +0200
On 10.04.21 16:12, Alby wrote:
> Does Lua support (natively or through a module) anything like
> (asynchronous) message passing between objects, in the style of the Io
> programming language (which is now defunct, too bad).
you may have a look at "mtstates" ( https://github.com/osch/lua-mtstates ): with
this library it's possible to pass messages to "objects" (i.e. lua states) that
are executed on any system thread as you want. "mtstates" is a rather low level
library that can be combined with any multi threading library and message
passing mechanism (e.g. "llthreads2" and/or "mtmsg"). If combined with
coroutines, convenient higher level constructs could be build upon this.