V
- the type of the value wrapped in the futureNb object.public interface HjDataDrivenFuture<V> extends HjFuture<V>
put()
method.
A DDF can be viewed as a container with a full/empty state that obeys a dynamic single-assignment rule. The runtime scheduler will then ensure that a task is only scheduled when all the DDFs in its await clause become available (full). There is no constraint on which task performs a put() operation on a DDF.
DDFs provide a first-class construct for expressing data-dependences among dynamic tasks, thereby decoupling the roles of the control parent and data parents. DDFs can also be used to enforce control dependences. A control dependence can be expressed with a DDF with dummy data.
It is illegal to perform a get() operation on an empty DDF; instead, a task can safely perform a get() on any DDF in
its await clause. Refer to Module0.asyncNbAwait(HjFuture, HjRunnable)
for the await clause and
the creation of data-driven tasks.
Details: Data-Driven Tasks and their Implementation. Sagnak Tasirlar, Vivek Sarkar. Proceedings of the International Conference on Parallel Processing (ICPP) 2011, September 2011.
HjFuture.CancelledException
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels the Data-driven futureNb, equivalent to a
failed(new CancelledException()) . |
void |
failed(Exception failedEx)
Associates the specified
Exception as the reason of failure while computing the result of the
HjDataDrivenFuture. |
V |
get()
Returns the value wrapped in the DDF.
|
void |
put(V value)
Associates the specified value with the HjDataDrivenFuture.
|
V |
safeGet()
Returns the value wrapped in the DDF.
|
V get() throws SuspendableException
It is illegal to perform a get() operation on an empty DDF; instead, a task can safely perform a get() on any DDF
in its await clause. Refer to Module0.asyncNbAwait(HjFuture, HjRunnable)
and related variants
for the await clause and the creation of data-driven tasks.
get
in interface HjFuture<V>
SuspendableException
V safeGet()
It is illegal to perform a safeGet() operation on an empty DDF; instead, a task can safely perform a safeGet() on
any DDF in its await clause. Refer to Module0.asyncNbAwait(HjFuture, HjRunnable)
and related
variants for the await clause and the creation of data-driven tasks.
boolean cancel()
failed(new CancelledException())
.cancel
in interface HjFuture<V>
IllegalStateException
- if called when the DDF has already been resolvedvoid put(V value)
value
- The value to store into the DDF.Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.