-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow invariant is violated when no obvious context switching #1421
Comments
Here is simpler example that reproduces the exception:
fails with:
If you replace works fine:
|
Thanks for the report. Running it from any coroutine builder (even |
Does it mean using `coroutineScope { }` would fix the issue too?
…On Thu, Aug 8, 2019, 10:57 Vsevolod Tolstopyatov ***@***.***> wrote:
Thanks for the report.
This problem is only reproducible when running collect from suspend fun
main which context is beyond our control.
Running it from any coroutine builder (even
withContext(EmptyCoroutineContext)!) fixes the issue
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1421?email_source=notifications&email_token=ABVG6BKXDYI7BPNZT52ZY33QDPNZBA5CNFSM4IKEUGO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD326RPY#issuecomment-519432383>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABVG6BMEPK6JMMXP6IX5ZG3QDPNZBANCNFSM4IKEUGOQ>
.
|
Yes |
…ain" or artificially started coroutine (e.g. by block.startCoroutine(...)) Fixes #1421
…ain" or artificially started coroutine (e.g. by block.startCoroutine(...)) Fixes #1421
Hello, I am knew to using flow and having trouble with a seemingly easy operator I am writing. Consider the following operator
castNotNull
I am unclear why the 3rd example below throws an
Is there a bug or is there something else I need to be doing? Thank you kindly for your help
The text was updated successfully, but these errors were encountered: