You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/04/23 06:49:00 UTC

[GitHub] tzezula commented on a change in pull request #500: COS Synchronization is performed at the end of initial scan.

tzezula commented on a change in pull request #500: COS Synchronization is performed at the end of initial scan.
URL: https://github.com/apache/incubator-netbeans/pull/500#discussion_r183289579
 
 

 ##########
 File path: java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java
 ##########
 @@ -883,8 +898,43 @@ private static String relativize(
                 start++;
             }
             return file.getAbsolutePath().substring(start);
-        }                        
-        
+        }
+
+        private void enqueueDeferred(final Runnable work) {
+            boolean addGuard = false;
+            synchronized (this) {
+                this.deferred.offer(work);
+                if (deferredGuard == 0) {
+                     addGuard = true;
+                    deferredGuard = 1;
+                }
+            }
+            if (addGuard) {
+                final JavaSource js = createSource();
+                synchronized (this) {
+                    if (deferredGuard == 1) {
+                        try {
+                            js.runWhenScanFinished((cc) -> drainDeferred(), true);
 
 Review comment:
   Fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists