src/Tools/jEdit/patches/vfs_manager
author wenzelm
Wed, 10 Jun 2020 19:59:12 +0200
changeset 71932 65fd0f032a75
parent 69838 4419d4d675c3
child 72247 c06260b7152c
permissions -rw-r--r--
updated to jedit-5.6pre1 (repository version 25349);

diff -ru 5.6pre1/jEdit-orig/org/gjt/sp/jedit/io/VFSManager.java 5.6pre1/jEdit-patched/org/gjt/sp/jedit/io/VFSManager.java
--- 5.6pre1/jEdit-orig/org/gjt/sp/jedit/io/VFSManager.java	2020-05-20 11:10:11.000000000 +0200
+++ 5.6pre1/jEdit-patched/org/gjt/sp/jedit/io/VFSManager.java	2020-06-10 15:37:21.842393040 +0200
@@ -380,6 +380,18 @@
 
 				if(vfsUpdates.size() == 1)
 				{
+					// slowdown race concerning Buffer.isLoading() status
+					// of Buffer.save() + Buffer.finishSaving()
+					// versus Buffer.load() + "runnable"
+					try
+					{
+						Thread.sleep(100);
+					}
+					catch(InterruptedException ie)
+					{
+						Thread.currentThread().interrupt();
+					}
+
 					// we were the first to add an update;
 					// add update sending runnable to AWT
 					// thread