Re: GNU-Pth and GLIB



Hi Jonas,

> Would it be of interest to have native GNU-Pth as a thread
> implementation besides POSIX and Solaris?

Basically I doubt it would be a good idea. Using threads in GLib/GTK
applications will mostly occur, because the taks at hand can't be solved
easily with the main loop. As pth is mainloop based, it doesn't seem like a
good idea integrating that (it then is a second mainloop underneath the glib
mainloop, oh no.) So an an example: You have a program for fractal sets. You
calculate them in one thread and paint the results, as they become ready. The
other thread just takes care of input and redrawing etc. Now with pth the
calculation thread would have to stop from time to time (pth is not preemtive)
and yield to another thread. But then you could have used the GLib main loop
in the first place. So all in all it doesn't look like a good idea to use pth.

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi ira uka de           |     är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi   |




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