CoroutineFunc


Description:

[ CCode ( instance_pos = 1.9 ) ]
public delegate Future? CoroutineFunc (CoroutineContext context)

This function prototype is used for spawning stackless coroutines.

A coroutine function receives a [struct@Dex.CoroutineContext] and optional user data and returns the next future for completion.

If the function returns null to indicate suspension, it must have stashed the currently awaited future in `coroutine` using the `DEX_COROUTINE_SUSPEND_*` helpers.

Returns:

a [class@Dex.Future]


Namespace: Dex
Package: libdex-1