MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / create_task

Method create_task

opcua/common/utils.py:180–187  ·  view source on GitHub ↗

threadsafe create_task from asyncio

(self, coro, cb=None)

Source from the content-addressed store, hash-verified

178 future.set_result(task)
179
180 def create_task(self, coro, cb=None):
181 """
182 threadsafe create_task from asyncio
183 """
184 future = Future()
185 p = functools.partial(self._create_task, future, coro, cb)
186 self.loop.call_soon_threadsafe(p)
187 return future.result()
188
189 def run_coro_and_wait(self, coro):
190 cond = threading.Condition()

Callers 1

run_coro_and_waitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected