News for hackers. Stuff that matters.
Re:"When I design software, I really try hard to make it sim... by MattJ100 on Sunday September 25, 2011 @04:55PM (#3036723)
FWIW there are numerous libraries available for OS threads in Lua. Some are low-level, directly binding the OS threading API[1], some are high-level[2], supporting message passing and atomic counters, etc.

[1]: https://github.com/Neopallium/lua-llthreads [2]: http://kotisivu.dnainternet.net/askok/bin/lanes/

Re:"When I design software, I really try hard to make it sim... by chubot on Sunday September 25, 2011 @11:03PM (#3037470)
Right, but this is different than Python and Ruby's threading, where threads can share state because they have a global interpreter lock. Lua has no such thing so both of those packages have to use message passing, which I think is good but not convenient in a lot of cases. Even though they are using threads, there is one Lua state per thread, so your threads have to serialize everything before communicating.

As mentioned in the PIL book, they are better termed "Lua Processes" even though they are implemented using OS threads.