Skip to content
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

Fast-path in Channel prevents ProduceCoroutine from cancelling #2506

Closed
qwwdfsad opened this issue Jan 29, 2021 · 0 comments
Closed

Fast-path in Channel prevents ProduceCoroutine from cancelling #2506

qwwdfsad opened this issue Jan 29, 2021 · 0 comments
Assignees
Labels

Comments

@qwwdfsad
Copy link
Member

After #2384 the following code now hangs instead of throwing CancellationException

@Test
fun p2384() = runBlocking {
    val myFlow = callbackFlow<Any> {
        close()

      // Should throw?
        delay(Duration.INFINITE)
    }

    // Should complete?
    myFlow.collect()
}
@qwwdfsad qwwdfsad added the bug label Jan 29, 2021
@qwwdfsad qwwdfsad self-assigned this Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant