MCPcopy Index your code
hub / github.com/python/cpython / next

Method next

Lib/multiprocessing/pool.py:853–873  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

851 return self
852
853 def next(self, timeout=None):
854 with self._cond:
855 try:
856 item = self._items.popleft()
857 except IndexError:
858 if self._index == self._length:
859 self._pool = None
860 raise StopIteration from None
861 self._cond.wait(timeout)
862 try:
863 item = self._items.popleft()
864 except IndexError:
865 if self._index == self._length:
866 self._pool = None
867 raise StopIteration from None
868 raise TimeoutError from None
869
870 success, value = item
871 if success:
872 return value
873 raise value
874
875 __next__ = next # XXX
876

Callers

nothing calls this directly

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected