Freigeben über


WinJS.Utilities.Scheduler.requestDrain function

Runs jobs in the scheduler without timeslicing until all jobs at the specified priority and higher have executed.

Syntax

WinJS.Utilities.Scheduler.requestDrain(priority, name).done( /* Your success and error handlers */ );

Parameters

  • priority [optional]
    Type: Number

    The priority to which the scheduler should drain. The default is -15.

  • name [optional]
    Type: String

    An optional description of the drain request for diagnostics.

Return value

Type: WinJS.Promise**

A Promise which completes when the drain has finished. Canceling this Promise cancels the drain request. This Promise will never enter an error state.

Requirements

Minimum WinJS version

WinJS 2.0

Namespace

WinJS.Utilities.Scheduler