Re: pending signal events

2004-04-21 Thread Joshua N Pritikin
On Wed, Apr 21, 2004 at 07:15:33PM +0100, Zefram wrote: > Back to my SIGTSTP handler. Its basic operation is thus: > > 0. start > 1. block SIGTSTP > 2. stop the watcher, returning SIGTSTP to default handling > 3. send a SIGTSTP to self > 4. unblock SIGTSTP, thus letting the pending SIGTSTP be del

pending signal events

2004-04-21 Thread Zefram
Back to my SIGTSTP handler. Its basic operation is thus: 0. start 1. block SIGTSTP 2. stop the watcher, returning SIGTSTP to default handling 3. send a SIGTSTP to self 4. unblock SIGTSTP, thus letting the pending SIGTSTP be delivered 5. after the process resumes, restart the watcher 6. end I'm c

NO_HIRES_TIME

2004-04-21 Thread Jerry D. Hedden
> * lib/Event.pm: Simplify hooking into Time::HiRes. Add a > NO_HIRES_TIME export_ok symbol to turn off the probing. This looks like just what I need. Thanks. BTW, I did submit a bug report against Time::HiRes. A 'fix' was made that reduced the time 'creep', but it didn't fully cor

[[email protected]: CPAN Upload: J/JP/JPRIT/Event-0.88.tar.gz]

2004-04-21 Thread Joshua N Pritikin
I haven't done a release for a long time. I hope I didn't botch anything. * lib/Event.pm: Simplify hooking into Time::HiRes. Add a NO_HIRES_TIME export_ok symbol to turn off the probing. * Event.xs: Remove U2time. Remove install_time_api(). * lib/Event.pod: More

Re: Event, ithreads, and shared variables

2004-04-21 Thread Joshua N Pritikin
On Tue, Apr 20, 2004 at 04:14:26PM -0400, hx wrote: > hi perl-loop. i'm attempting to use Event, ithreads, and shared > variables together. perl is 5.8.3, Event is 0.87. in particular, i'd > like to create a watcher that watches a shared variable. sample code: > > #!/usr/bin/perl > use warnings

more documentation

2004-04-21 Thread Zefram
Joshua N Pritikin wrote: >Are you sure? The poll attribute defaults to 'w' so not setting it is >not equivolent to it being unset. OK, then that's a doc bug. There's a lot more missing information about watcher construction too. Here's an attempt to approach completeness: --- Event.pod.old

Re: manually-invoked watchers

2004-04-21 Thread Joshua N Pritikin
On Wed, Apr 21, 2004 at 08:07:47AM +0100, Zefram wrote: > Joshua N Pritikin wrote: > >Thanks for the report. I fixed this bug in my code. > > Which behaviour does "now" have in your code? It throws an exception if the callback is not set. > Another bug: it's possible to start a var watcher for

Re: manually-invoked watchers

2004-04-21 Thread Joshua N Pritikin
On Tue, Apr 20, 2004 at 09:05:17PM +0100, Zefram wrote: > I have a need for a type of watcher for which events are only generated > manually. I want this for event types along the lines of "redraw > required": it's generated as a result of internal program logic, but > I want it to be subject to p

Event, ithreads, and shared variables

2004-04-21 Thread hx
hi perl-loop. i'm attempting to use Event, ithreads, and shared variables together. perl is 5.8.3, Event is 0.87. in particular, i'd like to create a watcher that watches a shared variable. sample code: #!/usr/bin/perl use warnings; use strict; use threads; use threads::shared;

Re: playing nicely with signal handlers

2004-04-21 Thread Zefram
Joshua N Pritikin wrote: >Have you tried simply calling ->stop() on the SIGTSTP signal watcher? >I believe that will change the handler back to SIG_DFL. Documentation fix: --- lib/Event.pod 2002-01-22 08:00:18.0 + +++ ../Event.pod.new2004-04-21 08:16:00.0 +0100 @@ -4

Re: manually-invoked watchers

2004-04-21 Thread Zefram
Joshua N Pritikin wrote: >What's wrong with a var watcher? Umm... nothing. Looking at its implementation, it appears to do exactly what I want. Thanks. >Thanks for the report. I fixed this bug in my code. Which behaviour does "now" have in your code? Another bug: it's possible to start a var

fix for incomplete documentation

2004-04-21 Thread Zefram
--- lib/Event.pod 2002-01-22 08:00:18.0 + +++ ../Event.pod.new2004-04-21 08:00:50.0 +0100 @@ -228,8 +228,9 @@ =item $watcher->pending -Returns whether this watcher has any events pending in the event -queue. +In scalar context, returns a boolean indicating whether