You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... then the game window will not exit properly when clicking on the window close ("x") button. Hitting the "stop" button in the editor still works.
The workaround is to declare the thread as a daemon thread:
thread(daemon =true){
// ...
}
... as this will not prevent the JVM from exiting.
I don't think that this needs to have super high priority, but if a library would spawn threads (e.g. an async HTTP client might do that) and doesn't permit control over the creation of the thread, then this can become an issue.
Maybe this can be handled on the C++ side? It works when stopping the game via the godot editor "stop" button after all.
The text was updated successfully, but these errors were encountered:
If we create a regular thread in Kotlin which keeps running, like so:
... then the game window will not exit properly when clicking on the window close ("x") button. Hitting the "stop" button in the editor still works.
The workaround is to declare the thread as a
daemon
thread:... as this will not prevent the JVM from exiting.
I don't think that this needs to have super high priority, but if a library would spawn threads (e.g. an async HTTP client might do that) and doesn't permit control over the creation of the thread, then this can become an issue.
Maybe this can be handled on the C++ side? It works when stopping the game via the godot editor "stop" button after all.
The text was updated successfully, but these errors were encountered: