wake one or more waiting greenlets

        :param num: the number of waiters to wake (default 1)
        :type num: int

        :raises:
            `RuntimeError` if the underlying lock hasn't been
            :meth:`acquired <Lock.acquire>`

def notify(self, num=1):
        """wake one or more waiting greenlets

        :param num: the number of waiters to wake (default 1)
        :type num: int

        :raises:
            `RuntimeError` if the underlying lock hasn't been
            :meth:`acquired <Lock.acquire>`
        """
        if not self._is_owned():
            raise RuntimeError("cannot wait on un-acquired lock")
        for i in xrange(min(num, len(self._waiters))):
            scheduler.state.awoken_from_events.add(self._waiters.popleft()[0])