MySpace

Happily Striding On Random and Not-So-Random Thoughts
Please read this before you post a comment.

Yasuro



Last Updated: 12/19/2009

Send Message
Instant Message
Email to a Friend
Subscribe

Gender: Male
Status: Single
Age: 44
Sign: Leo

City: SEATTLE
State: Washington
Country: US
Signup Date: 10/2/2004
Wednesday, October 28, 2009 

Category: Web, HTML, Tech
What I failed to look into in "Lua" (Monday, October 26, 2009) is concurrency. Lua supports co-routines, but not pre-emptive threads.

Lua Users' Wiki lists extensions in this regard. Lua for Windows (LfW) includes some of them. The authors of Lua Lanes provides his comparison of existing Lua threading solutions. Rings does look awkward.

Lua Lanes and LuaThreads seem to be good for my purposes. LuaThreads seems to be more closely reflect the underlying threads library; threads share the same environment and it's the programmer's responsibility to ensure its integrity. Unfortunately, since LuaThreads is not included in LfW and I am too lazy to install it by myself, Lua Lanes seems to be the only choice left for me.

luaproc might eventually be part of the official Lua, because one of the Lua authors himself is involved. They published a paper, titled "Exploring Lua for Concurrent Programming" in an unknown journal last year.

I did not look into LuaTask closely, which is included in LfW, but it's concurrency level looked more coarse than I want, because behavior of each task needs to be described in a separate Lua file; but it might be just a syntactic issue.

ConcurrentLua adopts "the share-nothing asynchronous message-passing model that is employed in the Erlang programming language," which naturally extends to distributed environments.
Previous Post: Lua | Back to Blog List | Next Post: doubleTwist