|
luaproc really seems interesting.The merger of coroutines (yield) and actual parallel threading is smooth. Maybe we can get a new threading model in Lua 5.2 (or 6.0) that will merge them even further?
Mapping Lua states M:N with OS threads is the right way to go. I shall adopt that to Lanes, as well.
What I see as downsides of luaproc is mainly the restriction of message types (number, string, boolean). This can be overcome by other addon modules that would, for example, implement Linda shared data storage s.a. what Lanes has. It need not be part of luaproc itself, though.
I do hope luaproc (or a derivative) eventually becomes an integral part of Lua, itself. Meaning it would be a package s.a. 'coroutine' currently is, and accompany Lua in the source tgz.
One neat thing about luaproc is that it will work even without multiple cores, or an OS threading library (s.a. pthreads). It will simply do separate Lua states, and run them in a cyclic fashion (eliminates Rings).
-asko Alexandre Skyrme kirjoitti 18.2.2009 kello 1:37:
Alex <alex7864 <at> googlemail.com> writes:I'm starting to learn Lua and came across the interesting "Exploring Luafor Concurrent Programming" paper. I'd like to try out the luaproclibrary but I couldn't find it anywhere. Are there any plans to make itpublic?hi,i'm glad you found the paper interesting. we indeed intended to make a public release of the library, but had not done so yet. however, i just created a project at luaforge and placed the source code there. in case you are stillinterested, the url is: http://luaforge.net/projects/luaproc --alexandre