This operator retains a sequential nature of flow if changing the context does not call for changing the dispatcher.
Otherwise, if changing dispatcher is required, it collects flow emissions in one coroutine that is run using a specified context and emits them from another coroutines with the original collector’s context using a channel with a defaultbuffer size between two coroutines similarly to buffer operator, unless buffer operator is explicitly called before or after flowOn, which requests buffering behavior and specifies channel size.
/** * Requests a channel with an unlimited capacity buffer in the `Channel(...)` factory function. */ publicconstval UNLIMITED: Int = Int.MAX_VALUE 没有限制
/** * Requests a rendezvous channel in the `Channel(...)` factory function — a channel that does not have a buffer. */ publicconstval RENDEZVOUS: Int = 0 没有缓冲,缓冲区为0
/** * Requests a conflated channel in the `Channel(...)` factory function. This is a shortcut to creating * a channel with [`onBufferOverflow = DROP_OLDEST`][BufferOverflow.DROP_OLDEST]. */ publicconstval CONFLATED: Int = -1 缓冲区为1
/** * Requests a buffered channel with the default buffer capacity in the `Channel(...)` factory function. * The default capacity for a channel that [suspends][BufferOverflow.SUSPEND] on overflow * is 64 and can be overridden by setting [DEFAULT_BUFFER_PROPERTY_NAME] on JVM. * For non-suspending channels, a buffer of capacity 1 is used. */ publicconstval BUFFERED: Int = -2 默认64