code: def notify(self, num=1):
          
          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])
docs: 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>`