Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Added comment

AuthorDaveJarvis <email>
Date2023-01-09 22:31:02 GMT-0800
Commit3e3c2016ce61d139c045fb15ffcaea4dda9aa74f
Parentc502b50
Delta9 lines added, 0 lines removed, 9-line increase
src/main/java/com/keenwrite/ui/actions/GuiCommands.java
private boolean mCanTypeset;
+ /**
+ * A {@link Task} can only be run once, so wrap it in a {@link Service} to
+ * allow re-launching the typesetting task repeatedly.
+ */
private Service<Path> mTypesetService;
+
+ /**
+ * Prevent a race-condition between checking to see if the typesetting task
+ * is running and restarting the task itself.
+ */
private final Object mMutex = new Object();