Re: Work woth GUI from a thread that was made by pthread_create function

On 7 Feb 2002, Michael Torrie wrote:

> That's a bit strong to say use heavy processes, not threads.

Yes, but there is so many problems with threads. First of all
it has a habit to break portability. What works for Linux
dosen't for FreeBSD etc...

> The glib
> and gdk functions do make it easy to attach handlers to i/o events,
> which often eliminates the need for threads and child processes
> altogether.

Yes and the important thing is that the OS is responsible for
signaling i/o envents to processes. In FreeBSD the treads are
library based and it realy is a mess...

> However, GTK+ is thread-aware if you follow the guidelines
> in the FAQ.  One thread can only manipulate the GUI at a time (true on
> windows or gtk).  So you have to use special critical section blocks.
> This has been covered quite a bit on this list(s), even in the last
> week.

Yes and to handle semaphores in your programs are something that
needs a great skill. And debugging is painfull...


Göran Hasse            email: gh raditex se     Tel: 08-6949270
Raditex AB   
Sickla Alle 7, 1tr                              Mob: 070-5530148

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]