News for hackers. Stuff that matters.
Re:Threads, slow and buggy by uriel on Wednesday June 03, 2009 @12:57PM (#640011)
> Message-passing works quite well, but coroutines are also a viable option.

Why not both as in CSP/Limbo? ;)

Edit: Note that you can get both in C too using the confusingly named libthread(2) http://man.cat-v.org/plan_9/2/thread (Also available in Unix as part of Plan 9 from User Space http://plan9.us )

Re:Threads, slow and buggy by silentbicycle on Wednesday June 03, 2009 @03:54PM (#640294)
You can do either in Lua pretty easily, too. Doing both doesn't make much sense, though - schlepping around large data structures in message-passing can be a performance problem, but unlike coroutines, can be very easily switched to a run over multiple machines.

Coroutines are in the core language, and there's also ConcurrentLua (http://concurrentlua.luaforge.net/) for message passing.

Re:Threads, slow and buggy by uriel on Thursday June 04, 2009 @02:48AM (#641058)
> schlepping around large data structures in message-passing can be a performance problem,

Not really, it is not too hard to implement it locally as passing pointers around.