Erik
05/03/2021, 3:15 PMMutableSharedFlow<Int>().emit(0)
(from a suspending function), then the emit
call does not suspend. The documentation says that on buffer overflow the call should suspend. To me it seems that there is no buffer, so emit(0)
causes a buffer overflow, so the emit
call should suspend. Instead, it returns quickly! Am I misinterpreting the following?
suspending on buffer overflowOr can the documentation be improved?
MutableSharedFlow()
have zero buffer, or no buffer? I mean that in the sense:
Can the buffer of size zero overflow?
Or is overflow impossible because there is no buffer in the first place?
The latter seems to be the case judging from the actual behaviour. However, the emit
docs don't mention that specifically.emit
docs