lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>
>From: "Peter Sommerfeld" <peter.sommerfeld@gmx.de>
>Date: Sat, 18 Dec 1999 02:01:31 -0200 (EDT)
>To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
>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.
>
>-- Peter

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.

/Erik