asyncx_ros2.ensure_aio_future
- asyncx_ros2.ensure_aio_future(coro_or_future, *, loop=None)[source]
Wrap an object in a
asyncio.Future.- Parameters
coro_or_future (Any) – A
rclpy.task.Futureobject or an awaitable object includingasyncio.Task, asyncio.Future, and coroutine.loop (Optional[asyncio.AbstractEventLoop]) – An event loop to wait for the completion of future
- Returns
A
asyncio.Futureobject that wraps the given future- Return type
asyncio.Future[Any]