def increment(self):
        "increment the counter, and wake anyone waiting for the new value"
        self._count += 1
        waiters = self._waiters.pop(self._count, [])
        if waiters:
            scheduler.state.awoken_from_events.update(waiters)
increment the counter, and wake anyone waiting for the new value