mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 07:46:08 +00:00
Only compute if absent/present if compute is not needed (locking opts)
This commit is contained in:
@@ -85,7 +85,6 @@ public class GroupedExecutor {
|
||||
|
||||
public void queue(String q, NastyRunnable r) {
|
||||
mirror.compute(q, (k, v) -> k == null || v == null ? 1 : v + 1);
|
||||
|
||||
service.execute(() ->
|
||||
{
|
||||
try {
|
||||
@@ -95,7 +94,7 @@ public class GroupedExecutor {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mirror.compute(q, (k, v) -> v - 1);
|
||||
mirror.computeIfPresent(q, (k, v) -> v - 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user