If a parallel program processes large data
in multiple phases with task interaction between phases, it may be more
efficient to let tasks preserve their states across phases rather than
creating for every phase new tasks to which the corresponding data have to be
passed. Therefore we introduce a concept that allows tasks to interact in a
safe way by side effects.
dist[data]()
creates an empty shared data object and
returns its handle d. Any task may use d to read from or write to
the shared data object no matter on which machine the task is executed.
dist[get](d)
blocks the execution of the current task
until the data object referenced by d is non-empty and then returns its
content. Multiple tasks may independently wait for and retrieve the result of
the same data object d.
dist[put](d, v)
writes the value v (which may
be any Maple object including tasks and data handles) into the shared data
object referenced by d (overwriting any previously written value). All
tasks blocked on d get released.
dist[clear](d)
empties the shared data object
referenced by d.
Shared data objects may be used to implement various forms of inter-task
communication, such as shared memory, single assignment objects, communication
channels and non-strict lists (streams).
Maintained by: Wolfgang Schreiner Last Modification: April 22, 1999