https://kotlinlang.org logo
#coroutines
Title
# coroutines
b

benny.huo

04/21/2019, 1:55 AM
Hey guys, I think there is a problem when calling
join
on an exceptionally completed job. After days digging, I figure out that if the
join
call falls into the fast-path or successfully suspending, a CancellationException will be thrown in this case, but if the
join
call falls into the
joinSuspend
path but not successfully suspending, no CancellationException will happen. I just wonder that is it a bug to get inconsistent result from
join
with the same code? I have created a gist here https://gist.github.com/enbandari/0321cffa792e0f98d90e0e77682aeaed to make it more clear.
b

bdawg.io

04/21/2019, 2:43 AM
Probably best to file an issue for this
b

benny.huo

04/21/2019, 3:06 AM
Okay. 😅
e

elizarov

04/21/2019, 9:55 AM
Thanks for report. There is indeed a race in
join
. Fixing it.
👍 8
b

benny.huo

04/21/2019, 10:26 AM
👍
2 Views