[hg] main-silver: #217608:Contention between repository updater ...

  • From: Tomas Zezula < >
  • To:
  • Subject: [hg] main-silver: #217608:Contention between repository updater ...
  • Date: Wed, 03 Jul 2013 15:50:20 -0700

changeset 0d5280c72c29 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/0d5280c72c29
description:
        #217608:Contention between repository updater and fs background 
refresh

diffstat:

 
parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
 |  19 +++++++--
 1 files changed, 15 insertions(+), 4 deletions(-)

diffs (39 lines):

diff --git 
a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
 
b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
--- 
a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
+++ 
b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
@@ -373,20 +373,31 @@
     
     public void enforcedFileListUpdate(
             @NonNull final URL rootUrl,
-            @NonNull final Collection<? extends URL> fileUrls) {        
+            @NonNull final Collection<? extends URL> fileUrls) throws 
IOException {
         final FileListWork flw = createFileListWork(rootUrl, fileUrls, 
false, true, true, false, null);
         if (flw != null) {
             LOGGER.log(
                 Level.FINE,
                 "Transient File List Update {0}",   //NOI18N
                 flw);
-            suspendSupport.runWithNoSuspend(
-                new Runnable() {
+            class T implements Callable<Void>, Runnable {
                     @Override
                     public void run() {
                         flw.doTheWork();
                     }
-                });
+
+                @Override
+                public Void call() throws Exception {
+                    suspendSupport.runWithNoSuspend(this);
+                    return null;
+                }
+            };
+            final T t = new T();
+            try {
+                Utilities.runPriorityIO(t);
+            } catch (Exception ex) {
+                throw new IOException(ex);
+            }
         }
     }
     

[hg] main-silver: #217608:Contention between repository updater ...

Tomas Zezula 07/03/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 349 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close