Re: Gtk+ and multithreating
- From: Cédric Lucantis <omer no-log org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Gtk+ and multithreating
- Date: Mon, 14 May 2007 20:56:05 +0200
Le lundi 14 mai 2007 20:20, Michael Ekstrand a écrit :
On Mon, 2007-05-14 at 19:53 +0200, Michelle Konzack wrote:
So, can anyone provide me with a Tutorial HOW TO MULTITHREAD those
functions <some_code_to_update_the_dialog> ?
And maybe some other tips...
Can you do everything asynchronously? Initiate your connections, and
set up some GIOChannels to watch for data availability? That will let
you set up callbacks so the GLib main loop will notify your program as
bits of data are available from each server. You don't block on
communication, your GUI stays responsive, and you don't have to worry
about the complexities of multithreading.
- Michael
Michael is probably right, but to answer your question there's a good
documentation about that in the GLib manual. See the
sections 'Threads', 'Thread Pools' and 'Asynchronous Queues' under 'Glib Core
Application Support'. If you want to know more, there's a tutorial here
(about pthread but with a general introduction) :
http://www.llnl.gov/computing/tutorials/pthreads
--
Cédric Lucantis
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]