Hi, is there a way to prohibit suspension in inlin...
# coroutines
l
Hi, is there a way to prohibit suspension in inline lambdas? In non inline, you have to explicitly allow it with the
suspend
keyword, but in inline, it's implicitly always allowed, by design it seems
d
It's not really allowing or not - all the suspend keyword does (simply speaking) is add a callback param to your function that gets called when the continuation is resumed after suspention... inline doesn't need that since the code inside it is expanded in the calling site by the compiler, and of the calling site is suspendavle or in a coroutine, then it is 'allowed', if not, not. If that's what you meant?
e
Not yet. See https://youtrack.jetbrains.com/issue/KT-17260 You are welcome to add your own use-cases there
👍🏽 1