It's indeed better. just applied this change as well. Thanks!


On Fri, Mar 1, 2013 at 9:51 AM, Saúl Ibarra Corretgé <
notifications@github.com> wrote:

> In gaffer/events.py:
>
> > @@ -277,3 +221,47 @@ def unsubscribe_all(self, events=[]):
> >                  self._wildcards = set()
> >              else:
> >                  self._events[evtype] = set()
> > +
> > +    ### private methods
> > +
> > +    def _dispatch_event(self):
> > +        if not self._event_dispatcher.active:
> > +            self._event_dispatcher.start(self._send)
> > +            self._spinner.start(lambda h: h.stop())
> > +
> > +    def _send(self, handle):
> > +        queue, self._queue = self._queue, deque(maxlen=self._queue.maxlen)
>
> Maybe instead of reassigning you can take the length, iterate on it's
> range() and popleft events? Sort of like this:
> https://github.com/saghul/rose/blob/master/rose/uv_events.py#L476
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/benoitc/gaffer/pull/23/files#r3201642>
> .
>