Re: Thread communication
- From: Harring Figueiredo <harringf yahoo com>
- To: G Hasse <gh raditex se>, Gustavo Carneiro <gjc inescporto pt>, gtk-app-devel-list gnome org
- Cc: "Lennartsson, Andreas" <alennartsson ICTV com>, "'gtk-app-devel-list gnome org'" <gtk-app-devel-list gnome org>
- Subject: Re: Thread communication
- Date: Wed, 13 Feb 2002 13:51:56 -0800 (PST)
I beg your pardon-- all of you :). But it seems that "we" are all scared of
coding gtk using threads. There is quite a difference in designing a system to
be multithreaded and a system to be muilti-precess. There are obvious
advantages and disadivatages to both approach (a Pthread book will underline
them.).But, once the design is ready and once you have decided on one approach,
go for it !!!
Sorry folks, but I am just tired of hearing the same music over and over...
There have been successfull programs written in GTK using threads. I will
name only one for now: gftp (www.gftp.org).
Please, let me know any additions to the list - I will add some myself once I
scrow the my programs list.
Best Regards,
Harring Figueiredo
--- G Hasse <gh raditex se> wrote:
On 13 Feb 2002, Gustavo Carneiro wrote:
On Tue, 2002-02-12 at 17:39, Lennartsson, Andreas wrote:
Hi,
I am using Gtk 1.2. My application main and a communication thread. I
spawn
the communication thread just before I call gtk_main. My idea was to emit
a
emit a signal int the communication thread, using
gtk_signal_emit_by_name.
Why use a thread at all? Thread is usefull only on multiprocessor systems
or in systmes with problems notifying on events on filedescriptors (eg
Windows) In Unix you do poll or select, and in gtk you do a
gdk_input_add( fd, GDK_INPUT_READ, GTK_SIGNAL_FUNC(file_function),
&cmdinfo );
(Where fd could be a socket). If you have a lot of communication your
design should go into an arrangement where you have several processes.
GH
----------------------------------------------------------------
Göran Hasse email: gh raditex se Tel: 08-6949270
Raditex AB http://www.raditex.se
Sickla Alle 7, 1tr Mob: 070-5530148
131 34 NACKA, SWEDEN
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]