utils.asyncs

This module implements all async functionality that one can use in any rendercanvas backend. This uses sniffio to detect the async framework in use.

To give an idea how to use sniffio to get a generic async sleep function:

libname = sniffio.current_async_library()
sleep = sys.modules[libname].sleep
class rendercanvas.utils.asyncs.Event

Generic async event object. Works with trio, asyncio and rendercanvas-native.

async rendercanvas.utils.asyncs.sleep(delay)

Generic async sleep. Works with trio, asyncio and rendercanvas-native.