mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vfs] more reliable fsnotifier termination (IDEA-239103)
GitOrigin-RevId: 89f5fd26fcbcfe03a52c41e50bf1d30113ed4591
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9185e79e7b
commit
1117641d95
+8
-2
@@ -216,12 +216,18 @@ public final class NativeFileWatcherImpl extends PluggableFileWatcher {
|
||||
try { writeLine(EXIT_COMMAND); }
|
||||
catch (IOException ignore) { }
|
||||
if (!processHandler.waitFor(10)) {
|
||||
ApplicationManager.getApplication().executeOnPooledThread(() -> {
|
||||
Runnable r = () -> {
|
||||
if (!processHandler.waitFor(500)) {
|
||||
LOG.warn("File watcher is still alive. Doing a force quit.");
|
||||
processHandler.destroyProcess();
|
||||
}
|
||||
});
|
||||
};
|
||||
if (myIsShuttingDown) {
|
||||
new Thread(r, "fsnotifier shutdown").start();
|
||||
}
|
||||
else {
|
||||
ApplicationManager.getApplication().executeOnPooledThread(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user