follow up to rev.31906. I think this was breaking the atomicity.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32528 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-07-06 22:17:55 +00:00
1 parent fe042a4998
commit e9463136f2
1 file changed
+6 -4
@@ -102,10 +102,12 @@ public class Executor extends Thread implements ModelObject {
Queue.Item queueItem;
Queue.Task task;
try {
queueItem = grabJob();
task = queueItem.task;
startTime = System.currentTimeMillis();
executable = task.createExecutable();
synchronized (queue) {
queueItem = grabJob();
task = queueItem.task;
startTime = System.currentTimeMillis();
executable = task.createExecutable();
}
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Executor throw an exception unexpectedly", e);
continue;