Re: gthreads and file operations



By the way, I had never programmed using glib threads before. Is the threads
part of the code I had sent earlier correct?

If you want people to actually test your code, you do need to show a
*complete* compilable and *minimal* test case.

In general, it's best to avoid threads. For some reasons, many people
think they need threads even if they don't. And threading brings in
all kinds of interesting problems.

Have you programmed using other thread APIs then?

Based on the incomplete program you submitted, I really don't see why
you think you need threads in *that* program. Is the gnomeProxy()
function really supposed to take a significant amount of time to run
(like tens of seconds) so that you really need it to run concurrently
with the UI? And it is a bit odd to call gdk_threads_enter() at the
beginning of the function and then gdk_threads_leave() at the end,
that is almost certainly not what you want.

also have to add GUI(a gnome panel applet) to my application. Would that
require a new thread?

No.

--tml



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