Marc Knaup
04/04/2020, 12:04 PMsend(…)
will block untill all flows have processed the sent element.
Is there something like that already?Dominaezzz
04/04/2020, 4:10 PMMutex
), then return consumeAsFlow()
in receiveAsFlow()
.Dominaezzz
04/04/2020, 4:11 PMreceiveAsFlow
calls when send
is suspended?Marc Knaup
04/04/2020, 4:29 PMreceiveAsFlow
merely creates a new Flow
. It’s not even suspending.Marc Knaup
04/04/2020, 4:29 PMMarc Knaup
04/04/2020, 4:30 PMDominaezzz
04/04/2020, 4:33 PMDominaezzz
04/04/2020, 4:34 PMMarc Knaup
04/04/2020, 4:37 PMFlow
already has exactly that behavior: emit()
suspends until the value collection is completed downstream.
It just doesn’t work for broadcasts.Dominaezzz
04/04/2020, 4:49 PMMarc Knaup
04/04/2020, 5:02 PM