Re: Why not to split gmc and other gnome applications into threads?

> > So it could be nice (like I think it's in Windows) that GMC and other
> > GNOME (even GTK) applications split themselves into threads. So for
> > example GMC could have a thread to redraw the icons on the desktop each
> > 5 seconds or so, another thread could redraw the tree of directories on
> > the left and other to redraw the icons of files on the right.
> > Even more nice would be to make these threads callable for every GNOME
> > application, so that every application could have a little GMC into
> > itself if it needed it.
> It's more difficult than in windows to make a simple thread, because when
> you call the fork command, you create a new process. So you have to chose
> a pipe ore something like this to communicate with the other thread.
> But this is only an explanation and no excusion.

I wish there was a way to yield flow to other event handlers;
even if it was sort of expensive, calling gtk_main_loop_process_pending
would make a lot of apps more responsive-- furthermore,
it could take a millisecond timeout as an argument,
allowing it to abort quickly if pending events had actually just
been processed recently.

It would be hard to define the semantics of what could be
reentered for the purposes of this call... but I'd be
willing to try and do so, and even implement it,
if people are interested...

It is *quite* apparent that this function will be like weak-reference
handlers-- you cannot call it from anywhere...

- Dave Benson

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