Skip to main content

async_unsafe

Decorator to mark functions as async-unsafe. Someone trying to access the function while in an async context will get an error message.

def async_unsafe(
message: string|callable
) - > function

Decorator to mark functions as async-unsafe. Someone trying to access the function while in an async context will get an error message.

Parameters

NameTypeDescription
message`stringcallable`

Returns

TypeDescription
functionA wrapped version of the function that performs an async-safety check before execution.