RequestQueue

RequestQueue

new RequestQueue()

This class keeps track of requests that need to be executed in order. The requests are often not idempotent and should be in a defined order to avoid surprising behaviors. DsClient and its derivatives usually prefixes state bound calls with 'session'; these methods should as a rule always use this request queue as a guard.

Source:

Methods

clear()

Clears the queue and aborts in flight requests so that their callbacks are not triggered.

Source:

next(currentRequestopt, nullable)

Session requests that require synchronization must use this function.

Source:
Parameters:
Name Type Attributes Description
currentRequest function <optional>
<nullable>

push(request)

Enqueue a request to be executed in a synchronized fasion.

Source:
Parameters:
Name Type Description
request function