MCPcopy Create free account
hub / github.com/rthalley/dnspython / wait_for

Method wait_for

tests/doq.py:37–44  ·  view source on GitHub ↗
(self, amount: int)

Source from the content-addressed store, hash-verified

35 self.trailers = None
36
37 async def wait_for(self, amount: int):
38 while True:
39 if self.buffer.have(amount):
40 return
41 self.expecting = amount
42 async with self.wake_up:
43 await self.wake_up.wait()
44 self.expecting = 0
45
46 async def receive(self, timeout: Optional[float] = None):
47 context: Union[trio.CancelScope, NullContext]

Callers 1

receiveMethod · 0.95

Calls 1

haveMethod · 0.80

Tested by

no test coverage detected