MCPcopy Index your code
hub / github.com/faif/python-patterns / __init__

Method __init__

patterns/creational/pool.py:36–38  ·  view source on GitHub ↗
(self, queue: Queue, auto_get: bool = False)

Source from the content-addressed store, hash-verified

34
35class ObjectPool:
36 def __init__(self, queue: Queue, auto_get: bool = False) -> None:
37 self._queue = queue
38 self.item = self._queue.get() if auto_get else None
39
40 def __enter__(self) -> str:
41 if self.item is None:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected