Re: [AD] pthread timer and event processing

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


> I also updated the QNX port to use the same pthreads stuff instead
> of the sigalrm stuff, but my sound card doesn't work under QNX, so I
> couldn't test that part of it.

I seize this opportunity to raise the problem of the multi-threaded timer
driver under Windows: I'm a little fed up with all the tweaks I had to do in
order to make it work, and it now appears the same things are starting up
again.

I think the MT driver was coded on a Win9x box: the threading model in Win9x
is very basic because Win9x doesn't support MP, and using a thread is
(relatively) cheap. But it is not the same story on Win2k and of course on
the upcoming XP, hence the problems.

The common solution is using a single thread for all timers, as the Windows
ST driver, the BeOS driver and this pthread driver do. In this way,
removing/reinstalling a timer doesn't involve any thread spawning and
doesn't cost much more than changing only its speed.

Therefore I propose to:
- definitively remove the MT timer driver from the CVS tree,
- revert to the previous semantics for install_in_ex() when the timer is
   already installed and make it explicit in the docs: this will fix the
   MIDI problem on all platforms,
- revert to the previous keyboard autorepeat handling code,
- and, last but not least, create the FATIMA: the Foundation Against Thread
   Inadvertent Misuse and Abuse ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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