AsyncNinjaConstants

public struct AsyncNinjaConstants

Constatns used my AsyncNinja Values of these constants were carefully considered

  • Defines whether usage of lock-free structures is allowed

    Declaration

    Swift

    public static let isLockFreeUseAllowed: Bool
  • Defines size of buffer for channels. Buffer size is an amount of the latest values for channel to remember

    Example:

    let producer = Producer<Int, Void>(bufferSize: ...)
    producer.update([0, 1, 2])
    producer.onUpdate { print($0) }
    producer.update([3, 4, 5])
    

    Output will depend on buffer size:

    • 0: 3 4 5
    • 1: 2 3 4 5
    • 2: 1 2 3 4 5

    This kind of behavior is present in each way of interaction with Channel: transformation, sync enumeration and etc.

    Declaration

    Swift

    public static let defaultChannelBufferSize: Int