LogManager: Prevent hangs at shutdown on Mac after dock right-click-quit (Gitlab #363)

This commit is contained in:
zzz
2022-07-29 12:22:50 -04:00
parent c1efe6daab
commit b606c2084b

View File

@@ -797,7 +797,10 @@ public class LogManager implements Flushable {
// try to prevent out-of-order logging at shutdown // try to prevent out-of-order logging at shutdown
flush(); flush();
// this could generate out-of-order messages // this could generate out-of-order messages
_writer.flushRecords(false); // Gitlab #363 Mac hangs in DTG displaying the popup
// after right-clicking the dock icon and selecting Quit
if (!SystemVersion.isMac())
_writer.flushRecords(false);
_writer.stopWriting(); _writer.stopWriting();
synchronized (_writer) { synchronized (_writer) {
_writer.notifyAll(); _writer.notifyAll();