Re: multithreaded callbacks (was Re: [AD] de fourium pointium ohium)

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


> (0) pause the main thread when timer (etc.) callbacks are running

What of the other threads ?
Under Windows there is always the event loop thread running in the
background. IMHO pausing it is not very safe because it is in charge of the
interaction with the OS, and freezing it may bring about very hazardous
effects to the stability of the system (especially under Win 95). This
thread triggers the switch events.

> (1 b) is okay, but I don't like it much.  Not enough control, and
> sometimes you just don't need the mutexes (e.g. increment a game
> speed counter).

Then we could add a new parameter to install_int() that would specify
whether the internal code locks or not the mutex associated with the
callback. Same thing with other callback installer functions.
But this would bloat everything.

-Eric



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