A container that allows one thread to wait for the processing
result of a parallel thread.
Typically one thread calls "get()" to block for the result, and another
thread, possibly queued, does the work and eventually calls "set(...)"
to unblock the waiter.
This is a copy of Doug Lea's public domain "FutureResult" class:
EDU/oswego/cs/dl/util/concurrent/FutureResult.java
For some reason it was not included in JDK 1.5's "java.util.concurrent"
package.
|