Skip to content

Commit

Permalink
remove completed TODO in ApiProxyLocalImpl
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <[email protected]>
  • Loading branch information
lachlan-roberts committed Nov 9, 2023
1 parent f80f694 commit f5b665f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,12 @@ public Future<byte[]> makeAsyncCall(
Semaphore semaphore = (Semaphore) environment.getAttributes().get(
LocalEnvironment.API_CALL_SEMAPHORE);
if (semaphore != null) {
// TODO: investigate why the acquire() locks when Sessions are configured in appengine-web.xml
// Maybe the semaphore has been released just before the app engine session manager starts
// saving the data in datastore.
semaphore.tryAcquire();
try {
semaphore.acquire();
} catch (InterruptedException ex) {
// We never do this, so just propagate it as a RuntimeException for now.
throw new RuntimeException("Interrupted while waiting on semaphore:", ex);
}
}
AsyncApiCall asyncApiCall =
new AsyncApiCall(environment, packageName, methodName, requestBytes, semaphore);
Expand Down

0 comments on commit f5b665f

Please sign in to comment.