Skip to content
Browse files
[FIXED JENKINS-16833] Use a CopyOnWriteArraySet for inProgress to avo…
…id blocking UI.
  • Loading branch information
jglick authored and kohsuke committed Feb 16, 2013
1 parent f3a2ae3 commit 2efa70955299ff7bb5d5bc9a5d12c218f922ab03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
@@ -68,6 +68,9 @@
<li class=bug>
maven-failsafe-plugin tests not recognized anymore
(<a href="">issue 16696</a>)
<li class=bug>
UI waiting on a queue lock to display cause of queue blockage.
(<a href="">issue 16833</a>)
<li class=rfe>
JNLP slave installers can now work transparently with secured Jenkins.
(SECURITY-54 / despite the ticket marker, this is not a security vulnerability)
@@ -26,10 +26,10 @@
import hudson.util.AdaptedIterator;

import java.util.Set;
import java.util.HashSet;
import java.util.Collection;
import java.util.AbstractCollection;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArraySet;

* Controls mutual exclusion of {@link ResourceList}.
@@ -39,7 +39,7 @@ public class ResourceController {
* {@link ResourceList}s that are used by activities that are in progress.
private final Set<ResourceActivity> inProgress = new HashSet<ResourceActivity>();
private final Set<ResourceActivity> inProgress = new CopyOnWriteArraySet<ResourceActivity>();

* View of {@link #inProgress} that exposes its {@link ResourceList}.
@@ -125,7 +125,7 @@ public synchronized Resource getMissingResource(ResourceList resources) {
* the given activity, or null if it's not blocked (and thus the
* given activity can be executed immediately.)
public synchronized ResourceActivity getBlockingActivity(ResourceActivity activity) {
public ResourceActivity getBlockingActivity(ResourceActivity activity) {
ResourceList res = activity.getResourceList();
for (ResourceActivity a : inProgress)

0 comments on commit 2efa709

Please sign in to comment.