lua-users home
lua-l archive

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


Den 2012-03-27 13:15, skrev steve donovan:
On Tue, Mar 27, 2012 at 1:02 PM, Javier Guerra Giraldez
<javier@guerrag.com>  wrote:
either you use different states, or make sure no two threads run it at
the same time.
That's the approach I've been taking, by using a mutex to ensure that
only one callback can run at a time. But simple print statements are
blowing up, unfortunately, even with these locks.  What does work is
if the main thread is sleeping all the time, and then the callbacks
behave fine.


Could it be that your print statements are non-threadsafe ?

Egil