diesieben07
08/25/2019, 6:42 PMflow { }
and channelFlow { }
is that the latter is "threadsafe", meaning you can switch dispatcher inside the suspending block? Or is there something else?octylFractal
08/25/2019, 6:56 PMdiesieben07
08/25/2019, 6:58 PMAdam Powell
08/25/2019, 7:12 PMdiesieben07
08/25/2019, 7:14 PMemit
, otherwise you can buffer N elements before you need to wait for the collector.octylFractal
08/25/2019, 7:18 PMbuffer
to change thatdiesieben07
08/25/2019, 7:18 PMZach Klippenstein (he/him) [MOD]
08/25/2019, 7:48 PMIf it’s a zero-capacity one you effectively have the same as withNot quite –emit
offer
still returns as soon as the handoff is complete, which, depending on which dispatcher the downstream is running on, may be before the downstream actually finishes processing that item.diesieben07
08/25/2019, 7:52 PMemit
upstream would wait for that operation, with channels it would compute the next element, which would then have to wait for downstream (for the next handoff). Right?Zach Klippenstein (he/him) [MOD]
08/25/2019, 7:53 PMdiesieben07
08/25/2019, 7:54 PMZach Klippenstein (he/him) [MOD]
08/25/2019, 7:55 PMdiesieben07
08/25/2019, 7:55 PM