MCPcopy
hub / github.com/sanic-org/sanic / wait

Method wait

sanic/signals.py:102–113  ·  view source on GitHub ↗

Block until the signal is next dispatched. Return the context of the signal dispatch, if any.

(self)

Source from the content-addressed store, hash-verified

100 future: asyncio.Future | None = None
101
102 async def wait(self):
103 """Block until the signal is next dispatched.
104
105 Return the context of the signal dispatch, if any.
106 """
107 loop = asyncio.get_running_loop()
108 self.future = loop.create_future()
109 self.signal.ctx.waiters.append(self)
110 try:
111 return await self.future
112 finally:
113 self.signal.ctx.waiters.remove(self)
114
115 def matches(self, event, condition):
116 return (

Callers 10

eventMethod · 0.80
_eventMethod · 0.80
recvMethod · 0.80
recv_burstMethod · 0.80
getMethod · 0.80
putMethod · 0.80
sendMethod · 0.80
receive_moreMethod · 0.80
sendMethod · 0.80
drainMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected