[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-openjfx-dev
Subject: Re: Bug: Not on FX application thread exception is inconsistent
From: Tom Eugelink <tbee () tbee ! org>
Date: 2018-11-13 16:06:43
Message-ID: bf1d4663-4a7b-c09d-6a26-3928fcb8a752 () tbee ! org
[Download RAW message or body]
> This isn't me not doing my research, this is objectively JavaFX not providing the \
> functionality that is necessary to do something rather trivial: update an API \
> object and provide information from that API object right after it's updated to the \
> user(without ChangeListener).
You are not using the right tool for the job. Thread management is not the \
responsibility of the UI toolkit, all it does is require that you got your stuff in \
order and run its code on the appropriate thread. Platform.run and runAndWait are \
just entry points for doing that, not multithreading solutions. There are good \
libraries for asynchronous execution; just use CompletableFuture, RxJava or \
JDeffered. RxJava even has build in support for putting a task back onto the JavaFX \
UI thread: observeOn(JavaFxScheduler.platform()).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic