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

Re: threading



"Christopher T. Lansdown" wrote:
> 
> Do you need to do something that a gtk timeout function won't allow you
> too?  The gtk_main loops works quite well under normal circumstances
> because it blocks on all appropriate file descriptors, for maximum
> responsiveness and minimum cycles wasted.
>         -Chris
> 

In fact, I just want to refresh the window at spare time. Because the
refresh task will eat too many cpu cycles. And every time when user 
input a key or some other action, the window need to be refreshed again. 
So when the background task is processing, user must can use GUI to
input
new command. And every time when a new command come, the unfinished 
refresh task will terminated, a new refresh task based on the new
command
began to run instead.

I think this kind of technology is quite normal and useful in GUI
 programming. Some system use multi-threading to solve the problem (such 
as OS/2), some system let applications to handle the problem themself 
(such as windoze 3.1). I don't know what is the normal way to do this 
in GTK.

-- 
 
 No brain, no pain.



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