MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / get

Method get

lib/sqlalchemy/util/queue.py:294–304  ·  view source on GitHub ↗
(self, block: bool = True, timeout: Optional[float] = None)

Source from the content-addressed store, hash-verified

292 raise Empty() from err
293
294 def get(self, block: bool = True, timeout: Optional[float] = None) -> _T:
295 if not block:
296 return self.get_nowait()
297
298 try:
299 if timeout is not None:
300 return await_(asyncio.wait_for(self._queue.get(), timeout))
301 else:
302 return await_(self._queue.get())
303 except (asyncio.QueueEmpty, asyncio.TimeoutError) as err:
304 raise Empty() from err

Callers

nothing calls this directly

Calls 4

get_nowaitMethod · 0.95
await_Function · 0.85
EmptyClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected