LockService Class
Constructor
LockService
(
-
[provider]
Parameters:
-
[provider]LockProvider optional
Methods
acquire
(
-
name -
[options={}] -
cb
Attempts to acquire a semaphore with the given name
Parameters:
-
nameString -
[options={}]Object optional-
[payload]Object optional -
[timeout]Integer optional
-
-
cbFunction
get
(
-
name -
cb
Retrieves the payload for the lock
Parameters:
-
nameString -
cbFunction
loadProvider
()
LockProvider
static
Inspects the current PB configuration to determine what lock provider to instantiate and return
Returns:
LockProvider:
An instance of a media provider or NULL when no provider can be loaded.
release
(
-
name -
[options={}] -
cb
Releases the lock
Parameters:
-
nameString -
[options={}]Object optional -
cbFunction
