lua-users home
lua-l archive

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


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.

> of course, if you use two states, you'll have to add some way to
> communicate between states; they can't be related states,

That's a pity. But it makes sense.

steve d.