Package org.eclipse.jetty.util
Class SharedBlockingCallback
java.lang.Object
org.eclipse.jetty.util.SharedBlockingCallback
Provides a reusable
Callback
that can block the thread
while waiting to be completed.
A typical usage pattern is:
void someBlockingCall(Object... args) throws IOException { try(Blocker blocker = sharedBlockingCallback.acquire()) { someAsyncCall(args, blocker); blocker.block(); } }
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SharedBlockingCallback
public SharedBlockingCallback()
-
-
Method Details
-
acquire
- Throws:
IOException
-
fail
-