Skip to content

Commit

Permalink
Updates from review.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Dec 16, 2024
1 parent 0de4415 commit b45316a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ public boolean requestComplete(Throwable failure)
{
try (AutoLock ignored = lock.lock())
{
return completeRequest(failure);
return lockedCompleteRequest(failure);
}
}

private boolean completeRequest(Throwable failure)
private boolean lockedCompleteRequest(Throwable failure)
{
assert lock.isHeldByCurrentThread();
if (requestState == State.PENDING)
Expand All @@ -185,11 +185,11 @@ public boolean responseComplete(Throwable failure)
{
try (AutoLock ignored = lock.lock())
{
return completeResponse(failure);
return lockedCompleteResponse(failure);
}
}

private boolean completeResponse(Throwable failure)
private boolean lockedCompleteResponse(Throwable failure)
{
assert lock.isHeldByCurrentThread();
if (responseState == State.PENDING)
Expand Down Expand Up @@ -251,8 +251,8 @@ public void abort(Throwable failure, Promise<Boolean> promise)
boolean abortResponse;
try (AutoLock ignored = lock.lock())
{
abortRequest = completeRequest(failure);
abortResponse = completeResponse(failure);
abortRequest = lockedCompleteRequest(failure);
abortResponse = lockedCompleteResponse(failure);
}

if (!abortRequest && !abortResponse)
Expand Down

0 comments on commit b45316a

Please sign in to comment.