Class: shaka.util.Mutex

A simple mutex.

Constructor

new Mutex()

A simple mutex.

Constructs the mutex.
Source:

Members

acquiredIdentifier :string

Type:
  • string
Source:

unlockQueue :Array.<function()>

Type:
  • Array.<function()>
Source:

Methods

acquire(identifier) → {Promise}

Acquires the mutex, as soon as possible.
Parameters:
Name Type Description
identifier string
Source:
Returns:
Type
Promise

release()

Releases your hold on the mutex.
Source:

releaseAll()

Completely releases the mutex. Meant for use by the tests.
Source: