TaskStateMonitor.WhenAllAsync Method (IEnumerable<CloudTask>, TaskState, TimeSpan, ODATAMonitorControl, IEnumerable<BatchClientBehavior>)

 

Begins asynchronous call to monitor an CloudTask collection until each of its members has reached a desired state at least once. The State of each CloudTask instance is assumed to authoritative at the time of the call. Instances that are already at the desiredState are ignored. The CloudTask instances in the collection are treated as read-only. No updates are made to any of these instances. This means that when the call completes (timeout or not) the CloudTask instances should be refreshed before using.

Namespace:   Microsoft.Azure.Batch
Assembly:  Microsoft.Azure.Batch (in Microsoft.Azure.Batch.dll)

Syntax

public Task<bool> WhenAllAsync(
    IEnumerable<CloudTask> tasksToMonitor,
    TaskState desiredState,
    TimeSpan timeout,
    ODATAMonitorControl controlParams = null,
    IEnumerable<BatchClientBehavior> additionalBehaviors = null
)
public:
Task<bool>^ WhenAllAsync(
    IEnumerable<CloudTask^>^ tasksToMonitor,
    TaskState desiredState,
    TimeSpan timeout,
    ODATAMonitorControl^ controlParams = null,
    IEnumerable<BatchClientBehavior^>^ additionalBehaviors = null
)
member WhenAllAsync : 
        tasksToMonitor:IEnumerable<CloudTask> *
        desiredState:TaskState *
        timeout:TimeSpan *
        controlParams:ODATAMonitorControl = null *
        additionalBehaviors:IEnumerable<BatchClientBehavior> = null -> Task<bool>
Public Function WhenAllAsync (
    tasksToMonitor As IEnumerable(Of CloudTask),
    desiredState As TaskState,
    timeout As TimeSpan,
    controlParams As ODATAMonitorControl,
    additionalBehaviors As IEnumerable(Of BatchClientBehavior)
) As Task(Of Boolean)

Parameters

  • timeout
    Type: System.TimeSpan

    The maximum amount of time this call will wait before timing out.

Return Value

Type: System.Threading.Tasks.Task<Boolean>

True if the WhenAll timed out, false if it did not.

See Also

WhenAllAsync Overload
TaskStateMonitor Class
Microsoft.Azure.Batch Namespace

Return to top