lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi evryone,

I created this lua module to have the possibility to use POSIX threads
in lua. It is a first release, so it may have bugs. If you discover
one, please tell me.

The only problem is that you'll have to recompile your lua
distribution, your lua library, and evrything that is linked staticly to
it (that is, all your C modules).
It uses in fact the two C macros, lua_lock and lua_unlock, like the
luaThread library (not (yet) aviable for lua 5.1)
<http://www.cs.princeton.edu/~diego/professional/luathread/>


I tried to use pluto, in order to copy all lua objects, but I didn't
suceed. I'm now trying to create a lua_xcopy function that would be
able to copy lua objects from one lua state to another, without making
links betwen the two lua states. But it's not that easy (especially for
closures/functions and threads :)

I know coroutines can do very powerful things ... but if a C function
block your coroutine somewhere, evrything is blocked :(. And as i
prefer using lua rather than creating a non blocking C binding, I
created this library.

And, the project URLs:

http://luaforge.net/projects/lua51pthread/
http://lua51pthread.luaforge.net/

-- 
Mildred       <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG :    <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]