jvmMain integration. is the function runOnThread really necessary? #943
|
https://arkivanov.github.io/Decompose/component/overview/#jvmdesktop-with-compose //this is the documentation's approach fun main() {
SwingUtilities.invokeAndWait {
CreateRootComponent()
}
application {
Window {
App()
}
}
}isn't it better? fun main() = application {
//AI told me that it runs on UI thread!
CreateRootComponent()
Window {
App()
}
} |
Answered by
arkivanov
Oct 19, 2025
Replies: 2 comments
|
The |
0 replies
Answer selected by
duongphuhiep
|
oh, I didn't know that. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
applicationComposable function runs on a composition thread. Currently I think it's the main thread, but eventually it might be running on a background thread. If it works for you, don't forget toremember {}the component instance.