We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have this simple flow
runBlocking(Dispatchers.Default) { channelFlow { val j = launch { delay(10000000) } var i = 0 while (true) { delay(1000) send(i++) if (i == 3) j.cancelAndJoin() } }.collect { println("received: $it") } }
Actual result:
received: 0 received: 1 received: 2 Exception in thread "main" kotlinx.coroutines.JobCancellationException: Job was cancelled; job=StandaloneCoroutine{Cancelled}@185d8b6
I expected to cancel launched coroutine but looks like it also cancels channelFlow. @qwwdfsad, Is it right behaviour ?
The text was updated successfully, but these errors were encountered:
Use regular produce instead of flowProduce in channelFlow
a02a10c
Concurrent work is already properly decomposed and does not expose an "partial cancellation" behaviour as other operators may do Fixes #1334
684a97b
qwwdfsad
No branches or pull requests
I have this simple flow
Actual result:
I expected to cancel launched coroutine but looks like it also cancels channelFlow.
@qwwdfsad, Is it right behaviour ?
The text was updated successfully, but these errors were encountered: