You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using TextView.textChanges and there's an issue with using safeOffer and capacity = RENDEZVOUS. If the consumer suspends before receiving again (e.g. calls delay for whatever reason), and elements are offered during this time (i.e. more text is typed), offer will fail, and those elements will never get sent/received.
It's not immediately obvious that capacity = RENDEZVOUS is the default, and that safeOffer causes the problem. The solution would be to call send in a launch (either from the GlobalScope or pass a CoroutineScope in).
The text was updated successfully, but these errors were encountered:
I've been using
TextView.textChanges
and there's an issue with usingsafeOffer
andcapacity = RENDEZVOUS
. If the consumer suspends before receiving again (e.g. callsdelay
for whatever reason), and elements are offered during this time (i.e. more text is typed),offer
will fail, and those elements will never get sent/received.It's not immediately obvious that
capacity = RENDEZVOUS
is the default, and thatsafeOffer
causes the problem. The solution would be to callsend
in alaunch
(either from theGlobalScope
or pass aCoroutineScope
in).The text was updated successfully, but these errors were encountered: