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

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


> I could be wrong, but it was y impression that Allegro's timers halt the
> main thread until they are done executing, thus making them look and act
> like real interrupts (from the user's perspective).

No, the timer thread runs concurrently alongside the other threads,
including the primary thread.

Stopping every other thread is not an easy business, especially with
Pthreads for which the stock API simply doesn't allow it (contrary to Win32
for example). The garbage collector used by GCC (Boehme-gc) uses this
approach: it periodically halts all threads in a program to recover unused
memory. Now it has separate codes to implement this method on each platform
supporting Pthreads (Linux, Solaris, HP-UX, AIX, ...) because it uses
non-portable tricks to do it.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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