MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / get

Method get

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

Source from the content-addressed store, hash-verified

303 raise Empty() from err
304
305 def get(self, block: bool = True, timeout: Optional[float] = None) -> _T:
306 if not block:
307 return self.get_nowait()
308
309 try:
310 if timeout is not None:
311 return self.await_(
312 asyncio.wait_for(self._queue.get(), timeout)
313 )
314 else:
315 return self.await_(self._queue.get())
316 except (asyncio.QueueEmpty, asyncio.TimeoutError) as err:
317 raise Empty() from err
318
319
320class FallbackAsyncAdaptedQueue(AsyncAdaptedQueue[_T]):

Callers

nothing calls this directly

Calls 4

get_nowaitMethod · 0.95
await_Method · 0.95
EmptyClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected