Closed whyoleg closed 4 years ago
The idea of the fix:
StreamFlow
inherits ChannelFlow
to support flow fusion (so to support buffer(n)
operator). Before, it was using channels under the hood. Because of it, additional requestN can be sent, because of asynchronous cancellation. Now it don't use channels, but manually switch context (needed to support flowOn
operator). But because emiting to FlowCollector should be from the same dispatcher, we need to switch context back while emiting.
fixes #97