Re: [AD] race condition when removing/adding ints

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Anyone remember what this line in timer.c means:
>
> #undef ALLEGRO_MULTITHREADED  /* FIXME */

I added it because we had deadlocks in the X11 port without it.

The problem with the timer.c code in a multithreaded environment is that you 
can remove a timer while the callback is being invoked (e.g. in the mouse 
pointer case).  Hence we need a global mutex.  But IIRC this didn't play nice 
with the original X11 code.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/