Merge "ReceiveCommits: Don't synchronize on non-final fields"
This commit is contained in:
@@ -1755,9 +1755,7 @@ public class ReceiveCommits {
|
|||||||
insertChange(threadLocalDb);
|
insertChange(threadLocalDb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
synchronized (newProgress) {
|
synchronizedIncrement(newProgress);
|
||||||
newProgress.update(1);
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -2174,9 +2172,7 @@ public class ReceiveCommits {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
synchronized (replaceProgress) {
|
synchronizedIncrement(replaceProgress);
|
||||||
replaceProgress.update(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -2846,4 +2842,10 @@ public class ReceiveCommits {
|
|||||||
private static boolean isConfig(final ReceiveCommand cmd) {
|
private static boolean isConfig(final ReceiveCommand cmd) {
|
||||||
return cmd.getRefName().equals(RefNames.REFS_CONFIG);
|
return cmd.getRefName().equals(RefNames.REFS_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void synchronizedIncrement(Task p) {
|
||||||
|
synchronized (p) {
|
||||||
|
p.update(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user