On Tue, 2006-12-05 at 10:16 +0000, Rhythmic Fistman wrote:
> > From: skaller <[EMAIL PROTECTED]>
> > spawn_pthread { gtk_main(); };
> >
> > print "GTK is running now!"; endl;
>
>
> Why not
> spawn_pthread { print "GTK might be running now!"; endl; };
> gtk_main();
>
> ?
>
> Switching the thread that uses a library of dubious
> quality midstream makes me nervous. Didn't this exact
> same pattern kill the first SDL example?
Yup. But there's a reason .. i want to find out how to use
GTK cross thread. To associate Felix fibres with Gtk widgets
instead of callbacks may need a Gtk server thread communicating
with the fibres in another pthread using pchannels.
It's not clear to me if GTK handles multiple events or if it
is serial -- it does have the same stupid novice design bug
as SDL however: it isn't re-entrant. Some of the underlying
libraries like Glib seem to be though.
Note Glib has a thread pool .. I'm fairly sure it is designed
to support threading.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language