[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: another try at multithreading
- From: Asko Kauppi <askok@...>
- Date: Sun, 22 Jun 2008 11:15:12 +0300
Mark Hamburg kirjoitti 22.6.2008 kello 8:35:
On a broader front, there is the question: What does it mean to copy
a closure from one state/universe to another? In particular, if I
assign to an upvalue while executing the closure in the receiving
universe, is that change reflected in the source universe?
Mark
I think the closure should be copied with those upvalues that it has
at the moment of copying. From there on, the values would live their
separate lives.
Then again, this is a matter of patching / changing the core Lua, so I
would use anything they offer.
It would indeed be good to have a "working group" discussing the
remaining cases (closures, userdata, coroutines) - how to copy them
between independent states. Such a workgroup could create necessary
core patching and gather experience on using it with Lanes et.al.
Closures:
- should be simple
- usage cases, where is this needed?
- maybe doable via debug API?
Userdata:
- multiple considerations. GC, light or real userdata etc. I am
perfectly fine with no userdata copying between states, unless
"killer" usage cases can be shown. Can they?
Coroutines:
- why would you want to? i.e. usage cases, please.
This work can commence separately of any existing parallelizing
library. Even agreeing that something is utterly meaningless (s.a.
copying coroutines?) would be a good decision.
-asko