public interface HjCountEureka<T> extends HjEureka<T,Void,List<T>>
We wish to terminate the computation when at least $K$ of the asynchronous computations have completed successfully.
A HjCountEureka
is initialized with a count $K$ and is resolved after exactly $K$ eureka events have been
triggered. A call to HjCountEureka.get()
returns a list of values of maximum length $K$ instead of a single
value. If none of the tasks triggered a eureka, then an empty list is returned. In general, a HjSearchEureka
can be viewed as a HjCountEureka
with a count of 1.
* Instances are created using a factory method in the HJlib runtime, e.g., ModuleZ.newCountEureka(long, int)
Modifier and Type | Method and Description |
---|---|
long |
curCount() |
long |
maxCount() |
check, check, get, offer, offer, onCleanup, onRegistration, resolved, shouldAbortOnOffer
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.