MCPcopy Index your code
hub / github.com/zauberzeug/nicegui / __await__

Method __await__

nicegui/javascript_request.py:26–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 request._event.set() # pylint: disable=protected-access
25
26 def __await__(self) -> Any:
27 try:
28 yield from asyncio.wait_for(self._event.wait(), self.timeout).__await__()
29 except asyncio.TimeoutError as e:
30 raise TimeoutError(f'JavaScript did not respond within {self.timeout:.1f} s') from e
31 else:
32 return self._result
33 finally:
34 self._instances.pop(self.request_id)

Callers

nothing calls this directly

Calls 3

waitMethod · 0.80
wait_forMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected