Evan R.
02/13/2020, 8:30 PMSuspendingView
class which allows you to invoke a suspendingAction { }
block as a coroutine replacement for asyncAction { }
(i.e. the block gives you a CoroutineScope for invoking suspending functions). It also auto-cancels launched coroutines if the view is undocked.
Is this something anyone else would be interested in? If so, what’s the best way to contribute this back to the TornadoFX project?
Here’s the current implementation in my project: https://github.com/emanguy/GitlabTimeTracker/blob/master/src/main/kotlin/ui/util/SuspendingView.kt
And here’s somewhere I use it to call suspending functions: https://github.com/emanguy/GitlabTimeTracker/blob/master/src/main/kotlin/ui/view/LoginView.kt#L33Czar
02/14/2020, 11:47 PMRomanow
02/16/2020, 2:03 PMEvan R.
02/17/2020, 12:56 PM