Retrieve the next item in the queue.

        Returns deserialized value, or None if there were no entries
        in the Queue.
420040
def next(self):
        
        if self.blocking >= 0:
            # returns queue name and item, we just need item
            res = self.redis.blpop([self.name], timeout=self.blocking)
            if res:
                res = res[1]
        else:
            res = self.redis.lpop(self.name)
        value = self.deserialize(res)
        logger.debug('Popped from "%s": %s', self.name, repr(value))
        return value
445376
def get_item(self, sequence_id, position):
        
        return self.from_record(self.get_record(sequence_id, position))
4464
def next(self):
        

        try:
            self._fetch()
            pkt = self.pkt_queue.popleft()
            try:
                self._infer_acked(pkt)
            except:
                pass
            try:
                self._infer_retry(pkt)
            except:
                pass

            return pkt
        except IndexError:
            raise StopIteration()
772100
def next(self):
        
        if self._selfiter is None:
            warnings.warn(
                "Calling 'next' directly on a query is deprecated. "
                "Perhaps you want to use iter(query).next(), or something "
                "more expressive like store.findFirst or store.findOrCreate?",
                DeprecationWarning, stacklevel=2)
            self._selfiter = self.__iter__()
        return self._selfiter.next()
294132
def get(self, timeout=None):
        """"""
        if timeout:
            try:
                result = self._queue.get(True, timeout)
            except multiprocessing.Queue.Empty:
                return(False, None)
            return(True, result)
        return self._queue.get()
1305377
def next_value(val)
      index = index_of(val)
      return nil unless index
      return nil if index == (get_length - 1)
      return get(index + 1)
    end
703066
def findNextItem(self, item):
        
        if not item:
            return None
        
        if item.childCount():
            return item.child(0)
        
        while item.parent():
            index = item.parent().indexOfChild(item)
            child = item.parent().child(index+1)
            if child:
                return child
            
            item = item.parent()
        
        index = self.indexOfTopLevelItem(item)
        return self.topLevelItem(index+1)
8282
def get_last_next(self, date):
        
        past, future = (None, None), (None, None)

        for mjd, value in reversed(self.data):
            if mjd <= date:
                past = (mjd, value)
                break
            future = (mjd, value)

        return past, future
74594
def get(self, id_):
        
        if self.api.queue_exists(id_):
            return Queue(self, {"queue": {"name": id_, "id_": id_}}, key="queue")
        raise exc.NotFound("The queue '%s' does not exist." % id_)
580401
def PopItem(self):
    
    try:
      # If no timeout is specified the queue will block if empty otherwise
      # a Queue.Empty exception is raised.
      return self._queue.get(timeout=self._timeout)

    except KeyboardInterrupt:
      raise errors.QueueClose

    # If close() is called on the multiprocessing.Queue while it is blocking
    # on get() it will raise IOError.
    except IOError:
      raise errors.QueueClose

    except Queue.Empty:
      raise errors.QueueEmpty
1092322
def _next_page(self):
        
        if not self._has_next_page():
            return None

        if self.next_page_token is not None:
            setattr(self._request, self._request_token_field, self.next_page_token)

        response = self._method(self._request)

        self.next_page_token = getattr(response, self._response_token_field)
        items = getattr(response, self._items_field)
        page = Page(self, items, self.item_to_value)

        return page
314678
def next(self):
        
        return self.iterator.next(task=self.task, timeout=self.timeout,
                                                    block=self.block)
333647
def get(self):
        
        # Discard ready connections that are too old.
        self.clean()

        # Return the first connection that is ready, and remove it
        # from the queue.  Connections that aren't ready are returned
        # to the end of the queue with an updated time, on the
        # assumption that somebody is actively reading the response.
        for _ in range(len(self.queue)):
            (conn, _) = self.queue.pop(0)
            if self._conn_ready(conn):
                return conn
            else:
                self.put(conn)
        return None
740208
@SuppressWarnings({"unchecked"})
    public SelectItem next() {

        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        if (items != null) {
            return (items.next());
        }
        return next();

    }
538159
def getResult(self, queue, uid, suid=None):
        
        if suid:
            r = self._get_client().get('rhumba.dq.%s.%s.%s' % (suid, queue, uid))
        else:
            r = self._get_client().get('rhumba.q.%s.%s' % (queue, uid))

        if r:
            return json.loads(r)
        else:
            return None
491016
def get(self):
        ''''''
        if self.bucket.get() < 1:
            return None
        now = time.time()
        self.mutex.acquire()
        try:
            task = self.priority_queue.get_nowait()
            self.bucket.desc()
        except Queue.Empty:
            self.mutex.release()
            return None
        task.exetime = now + self.processing_timeout
        self.processing.put(task)
        self.mutex.release()
        return task.taskid
1209943
def next(self):
        """"""
        # pylint: disable=protected-access
        with self._pcontext._queuelock:
            # Check that the pool still deals with this loop.
            # pylint: disable=protected-access
            pool_loop_reached = max(self._pcontext._thread_loop_ids)
            if pool_loop_reached > self._loop_id or self._queue.empty():
                raise StopIteration()
            else:
                return self._queue.get()