Structures

The following structures are available globally.

  • Additional struct with utility methods to work with coroutines.

    Important

    All await() methods must be called inside a coroutine.

    To check if inside a coroutine, use Coroutine.isInsideCoroutine. If you call await() outside the coroutine, the precondition inside these methods will fail, and you'ill get an error. In -Ounchecked builds, where preconditions are not evaluated to avoid any crashes, a thread-blocking mechanism is used for waiting the result.

    See more

    Declaration

    Swift

    public struct Coroutine