jw07/30/2019, 3:34 PM
in the same stack frame? or is that just a best-practice thing to avoid blowing the stack?
Dominaezzz07/30/2019, 3:38 PM
jw07/30/2019, 3:39 PM
. I mean the
parameter that is passed directly in bytecode.
Dominaezzz07/30/2019, 3:40 PM
in any stackframe has to be valid.
jw07/30/2019, 3:45 PM
throwing a checked exception synchronously that was supplied to its
in a seemingly-asynchronous way
Dominaezzz07/30/2019, 3:46 PM
jw07/30/2019, 3:47 PM
Dominaezzz07/30/2019, 3:49 PM
jw07/30/2019, 3:50 PM
Marko Mitic07/30/2019, 4:00 PM
Ilmir Usmanov [JB]07/30/2019, 4:35 PM
Seems like it would create an invalid stateLet the function be
, which calls
. Since you are using the same continuation object in recursive call, after the call's completion,
, effectively dropping the frames (since recursion is unrolled). At first glance, I see no harm in resuming at the same frame.
Dico07/30/2019, 4:57 PM
elizarov07/31/2019, 1:38 PM
with intrinsic version without protection. It is Ok to race it with resumption from another thread: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines.intrinsics/suspend-coroutine-unintercepted-or-return.html
jw07/31/2019, 1:41 PM
which I don't think has an equivalent, right? I had to hand-wave over some stuff or the post would have been twice as long.
elizarov07/31/2019, 3:44 PM