kotlin-jupyter icon indicating copy to clipboard operation
kotlin-jupyter copied to clipboard

Support executing suspend functions directly

Open soywiz opened this issue 3 years ago • 2 comments

Right now you have to call runBlocking { } manually, and it would be nice if that is not required

soywiz avatar Oct 19 '21 15:10 soywiz

Hi, @soywiz! It's now not available in Kotlin scripting, on which kernel is based on: https://youtrack.jetbrains.com/issue/KT-23212 Please keep track of this issue.

ileasile avatar Oct 22 '21 01:10 ileasile

What is possible is to add a renderer for Job and Deferred objects, which invokes runBlocking under the hood. It is also possible to add a Notebook-wide scope instead of Global and add a top-level launch extension. It was briefly discussed in #239. I can implement the corresponding plugin if anybody is interested.

altavir avatar Dec 11 '21 08:12 altavir