RFR: 8293839: Documentation memory consistency effects of runLater [v2]
Jens Lidestrom
duke at openjdk.org
Thu Sep 15 11:56:56 UTC 2022
> Prior to this change it was not clear from the documentation if callers of Platform#runLater must perform
> any synchronisation to have writes of the calling thread be visible in the JavaFX Application
> Thread. It is important to document either if callers can rely on runLater to do such synchronisation
> internally, or to document is users CAN NOT rely on runLater for this.
>
> This change documents that actions in a thread prior to submitting a runnable to
> Platform#runLater happen-before actions performed by the runnable in the JavaFX
> Application Thread.
>
> runLater inherits the memory consistency effects of InvokeLaterDispatcher in most cases.
> InvokeLaterDispatcher uses BlockingDeque internally. This change documents this
> in the same way as it is documented by BlockingDeque.
>
> Other implementations of runLater should have similar memory consistency effects.
Jens Lidestrom has updated the pull request incrementally with one additional commit since the last revision:
Use code formatting for 'runnable'
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/872/files
- new: https://git.openjdk.org/jfx/pull/872/files/79aea1ad..d935dc11
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=872&range=01
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=872&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jfx/pull/872.diff
Fetch: git fetch https://git.openjdk.org/jfx pull/872/head:pull/872
PR: https://git.openjdk.org/jfx/pull/872
More information about the openjfx-dev
mailing list