Async

class Varwin.Async

Bases: object

Managing asynchronous methods.

static Run(coroutine: CoroutineType) None

Runs the provided coroutine.

Parameters:

coroutine – coroutine without return value

Example:

Varwin.Async.Run(Chain1())
static AddStart(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called during scene preparation.

Parameters:

handler – Asynchronous handler function

Example:

async def OnStart():
  ...
Varwin.Async.AddStart(OnStart)
static AddUpdate(handler: Callable[[], CoroutineType]) None

Adds a handler function that will be called every frame.

Parameters:

handler – Asynchronous handler function

Example:

async def OnUpdate():
  ...
Varwin.Async.AddUpdate(OnUpdate)