ReactiveX / RxJavaFX

RxJava bindings for JavaFX
Apache License 2.0
519 stars 67 forks source link

Not on FX application thread #65

Closed khrlimam closed 6 years ago

khrlimam commented 6 years ago

Hey, I got java.lang.IllegalStateException when using Schedulers.newThread() or Schedulers.computation(), and when using JavaFxScheduler.platform() got no exception but the process is not asynchronously executed, I have to wait for the process to finish so i can access the UI. Any information, please?

thomasnield commented 6 years ago

Can you provide some context please? Since JavaFX elements have to be manipulated on the JavaFX thread, any part of the Observable chain that does so must operate on the JavaFxScheduler. If you need to run a background task, use two observeOn() calls, the first to move it to a newThread(), io(), or computation() scheduler, and a second to move the result to the JavaFxScheduler.

thomasnield commented 6 years ago

I haven't heard back awhile on this issue so I'm going to close. Feel free to open if there are further concerns to address.