[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Re: multi-state version of lua
- From: erik@<a href="/cgi-bin/echo.cgi?hougaard.com">...</a> (Erik Hougaard)
- Date: Sat, Dec 18 1999 12:02:51 GMT+0100
>From: "Peter Sommerfeld" <email@example.com>
>Date: Sat, 18 Dec 1999 02:01:31 -0200 (EDT)
>To: Multiple recipients of list <firstname.lastname@example.org>
>Subject: Re: multi-state version of lua
>Brian J. Swetland wrote:
>> Awesome. The multistate stuff is very handy -- it'll be nice to see it
>> in the official distribution.
>> Has anyone pondered allowing multiple states to share objects?
>> It would be handy to be able to have multiple lua threads running at
>> once but to have them share objects. Of course this opens a whole
>> can of worms regarding locking and so forth.
>To avoid that can of worms I would consider a very simple message based
>protocol. Of course, this requires deep copies of the message tables passed
>by value but even soft-real-time languages like Erlang do so.
I have done that in uCore, I'm using my XML tools to import/Export the objects (Functions are not copied unless they reside in a string). The only problem, is that the receiving state will first get the object when uCore reach the message loop, so there is no fixed arrival time for the object.