in reply to Re: Re: Re: I want to forfeit my timeshare
in thread I want to forfeit my timeshare
I can see reasons for doing it such as a pop-up window killer. You would check once per time slice whether that window was there, and then get out if there weren't any windows with the offending name. Sleep would work, but it would be more elegant to swat the window the timeslice after it appeared, rather than a 10th of a second later.
In my case I'm writing a servent (gnutella client), and I see now that a better way to do it would be to process all the stuff I need to, then the last command in the internal loop should be a blocking select with a short timeout.
I am currently rewriting it as a forking servent but there are some very nice benefits to keeping it all in the same process (eg shared data structures). Under windows you would certainly thread it but perl threading support is (as I understand it) still in development.
I hadn't realised that windows would reschedule the process to have the highest priority.
____________________
Jeremy
I didn't believe in evil until I dated it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: I want to forfeit my timeshare
by John M. Dlugosz (Monsignor) on Aug 25, 2001 at 02:34 UTC |