yield(_:)

    Yields an element to the NIOAsyncWriter.

    NIOAsyncWriter.swift:301
    iOS
    13+
    macOS
    10.15+
    tvOS
    13+
    watchOS
    6+
    func yield(_ element: Element) async throws

    Parameters

    element

    The element to yield.

    If the NIOAsyncWriter is writable the element will get forwarded to the NIOAsyncWriterSinkDelegate immediately. Otherwise, the element will be buffered and the call to yield(_:) will get suspended until the NIOAsyncWriter becomes writable again.

    If the calling Task gets cancelled at any point the call to yield(_:) will be resumed. Consequently, the provided element will not be yielded.

    This can be called more than once and from multiple Tasks at the same time.

    Other members in extension

    Types

    Type members

    Show obsolete interfaces (1)

    Hide obsolete interfaces

    Instance members