Re: zombie timers

2004-04-19 Thread Andy Mortimer
Zefram writes: > Andy Mortimer wrote: >>I'm sure I'm missing something fundamental here, but ... when should >>timer watchers be destroyed? > > After they've fired, they still exist and can be modified and retriggered. > See the "again" method. You need to explicitly cancel your watchers. > Try th

Re: zombie timers

2004-04-19 Thread Andy Mortimer
Zefram writes: > Andy Mortimer wrote: >>I'm sure I'm missing something fundamental here, but ... when should >>timer watchers be destroyed? > > After they've fired, they still exist and can be modified and retriggered. > See the "again" method. You need to explicitly cancel your watchers. > Try th

Re: zombie timers

2004-04-19 Thread Zefram
Andy Mortimer wrote: >I'm sure I'm missing something fundamental here, but ... when should >timer watchers be destroyed? After they've fired, they still exist and can be modified and retriggered. See the "again" method. You need to explicitly cancel your watchers. Try this variant of your test pr

playing nicely with signal handlers

2004-04-19 Thread Zefram
I've got a moderately complex program which I'm switching to an event-loop architecture, using the Event module. I'm doing something slightly naughty with signal handlers, and I'd like advice on how best to do it with Event. Before I started using Event, I had a couple of signal handlers that, as

zombie timers

2004-04-19 Thread Andy Mortimer
Hi all, I'm sure I'm missing something fundamental here, but ... when should timer watchers be destroyed? I would expect the following: #! perl -w use Event; sub DESTROY { warn "gone $_[0]" } sub ping { warn "ping $_[0]" } { my $obj={}; bless $obj; Event->timer(after => 1,