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 priority queuing. I'm surprised that there > isn't already a "non-specific" watcher class, one that never automatically > generates an event.
What's wrong with a var watcher? > (Digression: a bug report: > > Note that "now" works perfectly well on a stopped watcher. There's a > related bug: if the stopped event has no callback set, then a SEGV > results. Try that out by changing the setup of $my_watcher above to > > my $my_watcher = Event->var(parked => 1); > > I'm not sure what the semantics of "now" on a stopped watcher ought to be. > The two obvious candidates are: (a) act as now, but balk if no callback > is set; (b) silently do nothing if the watcher is stopped. Option (b) > would be convenient for the usage I discuss below, but I don't know how > "now" is being used by other people. Maybe both versions are useful. > > End digression.) Thanks for the report. I fixed this bug in my code. -- A new cognitive theory of emotion, http://openheartlogic.org
signature.asc
Description: Digital signature