lua-users home
lua-l archive

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


Excellent, thanks for that!

I've just got it compiled and running; I had to modify Lua.h a little, as
there seems to be some problem with the l_s() macro not being defined for
lthreads.c, which causes errors when using lua_ref() macro.  I presume
it needs to define LUA_PRIVATE, though that would prevent any libraries
from creating static strings from C code to pass to Lua unless they too
were defined with LUA_PRIVATE.

One small problem I've come across, when breaking the example child/parent
flood, it takes two breaks (ctrl-c)... one kills one thread, but the other
thread continues.  Probably best if the break killed the process, having
a thread quit by the user would be quite difficult to deal with gracefully.

Thanks again for the changes.

Love, Light and Peace,
- Peter Loveday
eyeon Software


----- Original Message ----- 
From: "Diego Nehab" <diego@tecgraf.puc-rio.br>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Saturday, December 15, 2001 8:57 AM
Subject: [ANNOUNCE]: LuaThreads 1.0-work


> Hi all,
> 
> I  have  just  re-released  LuaThreads-1.0-work.  The  new  release  was
> modified due to  our discussions and the present state  is summarized by
> the observations in the manual:
> 
> * LuaThreads mutexes are recursive in the sense that successive calls to
>   mutex:lock() nest. If the mutex owner locks a mutex n times, it has to
>   unlock  the mutex  the  same  n times  before  the  mutex switches  to
>   unlocked state.
> 
> * LuaThreads conditions are safe in the  sense that even if a thread has
>   more than  one lock over  a mutex, cond:wait(mutex) manages  to unlock
>   the mutex  before blocking  the caller thread.  Upon return,  the same
>   number of locks is restored into the mutex.
> 
> The code  should work  with any pthreads  compliant or  Win32 platforms.
> This   is  still   a  work   version,   though,  and   there  might   be
> corrections/modifications before  and after  Lua 4.1 final  is released.
> Suggestions and comments are welcome as usual.
> 
> Regards,
> Diego.
> 
>