Re: [AD] [GUI] Error using MSG_IDLE

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


> And why doesnt then allegro use a all-in-one thread
> i mean smthing like
> if (mouse_installed)
>   do mouse_stuff
> if (keyboard_installed)
>   do keyboard_sutff
> etc etc
> it's all synchronized if it only uses one thread, isnt it?

Of course.

> is that possible instead of one for the mouse, one for the keyboard, etc
> etc?
> of course, user timers, must be different threads :)

It was Stephan Schimanski's decision; he certainly targeted 8-processor
machines when he was writing the Windows port ;-)
I think that's a good choice; the code is much cleaner and very modular. But
the drawback is the need for proper synchronisation between the threads.
I've attached a fix, tested with demo and test program, your program and
Henrik's Flat program.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: wddlock2.zip
Description: Zip compressed data



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