Re: pending signal events

2004-04-22 Thread Joshua N Pritikin
On Thu, Apr 22, 2004 at 08:36:07AM +0100, Zefram wrote: > And a final thought before I head off on holiday: consider the event > sequence > > 0. start a signal watcher > 1. receive a signal > 2. start a second watcher for the same signal > 3. send another signal > 4. process events > > At the mom

Re: pending signal events

2004-04-22 Thread Joshua N Pritikin
On Thu, Apr 22, 2004 at 08:16:43AM +0100, Zefram wrote: > Joshua N Pritikin wrote: > >> 0. (bug) ->pending() should do an asynccheck > > > >That changes the documented behavior too much. > > How so? Because merely calling asynccheck never eliminates the race condition. It just makes it "shorter."

Re: pending signal events

2004-04-22 Thread Zefram
And a final thought before I head off on holiday: consider the event sequence 0. start a signal watcher 1. receive a signal 2. start a second watcher for the same signal 3. send another signal 4. process events At the moment, both watchers get events with hits=2. The correct behaviour would be f

Re: pending signal events

2004-04-22 Thread Zefram
Joshua N Pritikin wrote: >Ick. That's probably a bug. What I'm going to do is just drop any >pending signals when you can stop(). Will that work for you? Interesting. ->stop is actually documented to cancel pending events; I hadn't noticed that before. So that change does seem to be necessary