ComputationSync Method Naiad Help

[This is preliminary documentation and is subject to change.]

Blocks until all subscriptions have processed all inputs up to the supplied epoch. If the computation has no subscriptions, no synchronization occurs.

Namespace: Microsoft.Research.Naiad
Assembly: Microsoft.Research.Naiad (in Microsoft.Research.Naiad.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax

C#
void Sync(
	int epoch
)

Parameters

epoch
Type: SystemInt32
The epoch.
Remarks

This method is commonly used along with BatchedDataSourceTRecord to process epochs of input data in batches, or with a bounded number of outstanding epochs. If the computation contains many inputs and outputs that are stimulated asynchronously, the Sync(Int32) method provides a mechanism to synchronize on an individual subscription.
Examples

var source = new BatchedDataSource<int>(); var subscription = computation.NewInput(source) /* ... */ .Subscribe(); for (int i = 0; i < numEpochs; ++i) { source.OnNext(i); computation.Sync(i); // Alternatively subscription.Sync(i); }
See Also

Reference