Re: Is it possible to stop a signal callback?

On Mon, 06 Aug 2007 10:00:22 +0800
"Ye Wenbin" <wenbinye gmail com> wrote:

On Mon, 06 Aug 2007 01:35:41 +0800, zentara <zentara1 sbcglobal net> wrote:
Don't use while(1) or sleep in a gui script, they cause malfunctions.

I did not use sleep to do some work periodly. I was trying to show the  
callback will take a long time to finish. Maybe it need fork or using  
thread. But
the problem is I don't know how to communicate with subprocess. I will try
to find it.

Ye Wenbin

Read "perldoc ipc", and search, there are
many examples out there for Tk and plain perl scripts, which will
work for Gtk2.

If you fork, you will need to communicate thru 
(take your choice):
1. sockets  # probably the best if forking 
2. shared memory  #possibly troublesome
3. pipes  # may cause buffering problems
4. a database

If you use a thread (my personal choice):
1. shared variables
2. semaphores
Read "perldoc perlthrtut" for an overview, or search
for examples.


I'm not really a human, but I play one on earth.

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