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

Method _set

Lib/multiprocessing/pool.py:877–892  ·  view source on GitHub ↗
(self, i, obj)

Source from the content-addressed store, hash-verified

875 __next__ = next # XXX
876
877 def _set(self, i, obj):
878 with self._cond:
879 if self._index == i:
880 self._items.append(obj)
881 self._index += 1
882 while self._index in self._unsorted:
883 obj = self._unsorted.pop(self._index)
884 self._items.append(obj)
885 self._index += 1
886 self._cond.notify()
887 else:
888 self._unsorted[i] = obj
889
890 if self._index == self._length:
891 del self._cache[self._job]
892 self._pool = None
893
894 def _set_length(self, length):
895 with self._cond:

Callers

nothing calls this directly

Calls 3

appendMethod · 0.45
popMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected