MCPcopy
hub / github.com/nonebot/nonebot2 / wait

Method wait

nonebot/internal/params.py:160–169  ·  view source on GitHub ↗

等待子依赖结果

(self)

Source from the content-addressed store, hash-verified

158 self._waiter.set()
159
160 async def wait(self):
161 """等待子依赖结果"""
162 await self._waiter.wait()
163 if self._state != CacheState.FINISHED:
164 raise RuntimeError("Invalid cache state")
165
166 if self._exception is not None:
167 raise self._exception
168
169 return self._result
170
171
172class DependParam(Param):

Callers 7

_listen_exitMethod · 0.80
_listen_force_exitMethod · 0.80
_solveMethod · 0.80
background_taskFunction · 0.80
_handle_wsFunction · 0.80
calling_api_hook2Function · 0.80
called_api_hook2Function · 0.80

Calls

no outgoing calls

Tested by 4

background_taskFunction · 0.64
_handle_wsFunction · 0.64
calling_api_hook2Function · 0.64
called_api_hook2Function · 0.64