On Tue, Mar 13, 2007 at 06:31:45PM -0800, Lothar Scholz wrote:
For threading the answer is simple and not satisfying: There is no
really usefull scripting language yet. Python supports it a little
bit,
Ruby not at all, Perl is using a fork like modell and TCL is going
the
LUA way of complete isolated threads.
Thats a pretty good summary, but alone among the Python/Ruby/Perl/Lua,
Lua allows itself to be compiled with thread-aware locking, LuaThread
uses this capability.
Does anybody know what the granularity of this locking is? Even though
its a feature only lua has, there is almost no published information I
can find about it! What is the performance of LuaThread? Can it be
used
profitably on a multi-core machine, for example, to get higher cpu
usage?
Or, if you want to spin off worker threads to do file i/o operations,
but have all your network i/o running with select-driven
coroutines, is
the locking of such granularity that LuaThread is a reasonable tool?
Cheers,
Sam