attach
attach copied to clipboard
Native Callbacks fail if service is started from background thread
Gluon Attach services need to be initialized from the JavaFX thread, in order to perform the callbacks to the same thread
If any service is initialized from another thread (i.e. a background thread), the native part will work, but the callbacks will fail (and the app will crash)
Investigate the use of AttachCurrentThread
, or document the use of Platform.isFxApplicationThread()
to do the service initialization from Platform.runLater()
.
safest approach in case of unsure is to start a new native thread, let that do the work, and call AttachThread on that.