'Dispatch ready connection events'

def _dispatch_connection_events(self):

    if (not self._ready_events):
        return
    with self._acquire_event_dispatch() as dispatch_acquired:
        if (not dispatch_acquired):
            return
        for _ in compat.xrange(len(self._ready_events)):
            try:
                evt = self._ready_events.popleft()
            except IndexError:
                break
            evt.dispatch()
