MCPcopy Create free account
hub / github.com/langchain-ai/langgraph / wait

Method wait

libs/langgraph/langgraph/utils/queue.py:114–120  ·  view source on GitHub ↗

If queue is empty, wait until an item maybe is available, but don't consume it.

(self, block=True, timeout=None)

Source from the content-addressed store, hash-verified

112 raise queue.Empty
113
114 def wait(self, block=True, timeout=None):
115 """If queue is empty, wait until an item maybe is available,
116 but don't consume it.
117 """
118 if timeout is not None and timeout < 0:
119 raise ValueError("'timeout' must be a non-negative number")
120 self._count.wait(block, timeout)
121
122 def empty(self):
123 """Return True if the queue is empty, False otherwise (not reliable!)."""

Callers

nothing calls this directly

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected