MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / result

Method result

helpers/defer.py:129–145  ·  view source on GitHub ↗
(self, timeout: Optional[float] = None)

Source from the content-addressed store, hash-verified

127 )
128
129 async def result(self, timeout: Optional[float] = None) -> Any:
130 if not self._future:
131 raise RuntimeError("Task hasn't been started")
132
133 loop = asyncio.get_running_loop()
134
135 def _get_result():
136 try:
137 result = self._future.result(timeout) # type: ignore
138 # self.kill()
139 return result
140 except TimeoutError:
141 raise TimeoutError(
142 "The task did not complete within the specified timeout."
143 )
144
145 return await loop.run_in_executor(None, _get_result)
146
147 def kill(self, terminate_thread: bool = False) -> None:
148 """Kill the task and optionally terminate its thread."""

Callers 14

run_taskMethod · 0.45
_run_chatFunction · 0.45
refresh_parallel_jobsFunction · 0.45
result_syncMethod · 0.45
_get_resultMethod · 0.45
killMethod · 0.45
processMethod · 0.45
respondMethod · 0.45
_gate_innerMethod · 0.45
processMethod · 0.45
processMethod · 0.45
_run_messageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected