Re: [AD] Mini-synchronization API proposal for 4.1.x

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


> It works with both pthreads and SIGALRM.  What happens is
> that if callbacks are disabled, any new callback 'events' are added to
> the queue, which is completely flushed when callbacks are reenabled. I
> don't know if that's good (what if the flushing takes too long?), but
> it was easy to code :-)

I'm in the process of extending your code, but I came across a glitch: most
callback events are uni-directional (from Allegro to user) so can easily be
delayed, but two of them (keyboard_callback and keyboard_ucallback) are
bi-directional.

However, these two callbacks are a little bit different from the other ones
(timer, low-level keyboard, mouse, switch) because they are called on
already processed (high-level) data, so I think we could exclude them from
the event pool and rename them 'filter' instead (keyboard_filter and
keyboard_ufilter) with two #define in alcompat.h .

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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