[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Object "Forwarding" Between States
- From: Oliver <oschmidt-mailinglists@...>
- Date: Wed, 29 Jun 2022 10:23:09 +0200
On 29.06.22 10:12, Marc H. Balmer wrote:
> Am 29.06.22 um 10:03 schrieb Oliver:
>> On 29.06.22 09:55, Marc H. Balmer wrote:
>>>> https://github.com/osch/lua-mtstates
>>> There is also mqLua, https://github.com/arcapos/mqlua
>> As far as I understand, mqLua ties the state to a thread whereas mtstates allows
>> the state to be called from any thread. Or am I misunderstanding something?
>
> No, you do not. It isolates the state, communication is done using 0MQ (i.e.
> there is no locking atm).
One could interpret a mtstates object as an heavy weight stateful object that
can be passed to other threads by id (also using ZeroMQ or other multi threading
and message passing solutions) as long as the other threads are living in the
same process. It depends on the surrounding usage and implementation if than
there are two concurrently running threads accessing the same mtstates object at
the same time (and therefore producing lock-and-wait scenario) or not.
Best regards,
Oliver