Asyncio extensions and utilities.
- async hikari.internal.aio.all_of(*aws, timeout=None)#
Await the completion of all the given awaitable items.
If any fail or time out, then they are all cancelled.
The results of each awaitable in the order they were invoked in.
- hikari.internal.aio.completed_future(result=None, /)#
Create a future on the current running loop that is completed, then return it.
The value to set for the result of the future.
Tis a generic type placeholder for the type that the future will have set as the result.
None, in which case, this will return
The completed future.
When called in an environment with no running event loop.
- hikari.internal.aio.destroy_loop(loop, logger)#
Destroy the passed loop.
- async hikari.internal.aio.first_completed(*aws, timeout=None)#
Wait for the first awaitable to complete.
The awaitables that don’t complete first will be cancelled.
Completion is defined as having a result or an exception set. Thus, cancelling any of the awaitables will also result in the others being cancelled.
If the first awaitable raises an exception, then that exception will be propagated.
If more than one awaitable is completed before entering this call, then the first future is always returned.
Get the current usable event loop or create a new one.
The requested loop.
Determine if the object is an async iterable or not.
Determine if the object is an async iterator or not.