Integrated: 8295324: JavaFX: Blank pages when printing
eduardsdv
duke at openjdk.org
Tue Dec 6 12:52:04 UTC 2022
On Fri, 14 Oct 2022 15:45:10 GMT, eduardsdv <duke at openjdk.org> wrote:
> This fixes a race condition between application and 'Print Job Thread' threads when printing.
>
> The race condition occurs when application thread calls `endJob()`, which in effect sets the `jobDone` flag to true,
> and when the 'Print Job Thread' thread was in the `synchronized` block in `waitForNextPage()` at that time.
> The 'Print Job Thread' thread checks `jobDone` flag after exiting the `synchronized` block and, if it is true, skips the last page.
>
> In this fix, not only the `jobDone` is checked, but also that there is no other page to be printed.
> It was also needed to introduce a new flag 'jobCanceled', to skip the page if the printing was canceled by 'cancelJob()'.
This pull request has now been integrated.
Changeset: 7b3c88b5
Author: Eduard Sedov <eduard.sedov at zeiss.com>
Committer: Kevin Rushforth <kcr at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/7b3c88b5aeb802c756056bc3bf9a167dc359f1ab
Stats: 20 lines in 1 file changed: 8 ins; 0 del; 12 mod
8295324: JavaFX: Blank pages when printing
Reviewed-by: prr, kcr
-------------
PR: https://git.openjdk.org/jfx/pull/916
More information about the openjfx-dev
mailing list