MCPcopy
hub / github.com/AirtestProject/Poco / wait

Method wait

poco/utils/simplerpc/simplerpc.py:70–81  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

68 self.status = self.CANCELED
69
70 def wait(self, timeout=None):
71 start_time = time.time()
72 while True:
73 if not BACKEND_UPDATE:
74 self.agent.update()
75 if self.status == self.WAITING:
76 time.sleep(0.005)
77 if timeout and time.time() - start_time > timeout:
78 raise RpcTimeoutError(self)
79 else:
80 break
81 return self.result, self.error
82
83 def __str__(self):
84 conn = self.agent.get_connection()

Callers 3

new_funcFunction · 0.45
hasMovementFinishedMethod · 0.45
invokeMethod · 0.45

Calls 2

RpcTimeoutErrorClass · 0.85
updateMethod · 0.45

Tested by

no test coverage detected