Re: [AD] OSX END_OF_MAIN musings

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


On Sat, 2004-12-04 at 13:01 +0100, Evert Glebbeek wrote:

> Yeah, seems to solve the problem indeed... can we be sure that 
> allegro_init() is always called from the main thread though?
> Playing devil's advocate here, but there must be no catch if we want this 
> to work...

I think, we can safely require that allegro_init must be called from the
main thread.

I just had an evil thought, to avoid fork:

#define allegro_init(); install_allegro(...); } void user_thread(void) {

So, now install_allegro simply can never return and start the event
thread, and start user_thread as a separate thread. Other platforms
would simply call user_thread with a normal function call.

Of course, this would mean, there could be no return value for
install_allegro. No real advantage over END_OF_MAIN I guess.

-- 
Elias Pschernig





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