Skip to content

AnyLock

Mykhailo Stadnyk edited this page Nov 23, 2020 · 2 revisions

Globals / AnyLock

Interface: AnyLock

Lock implementation interface to follow

Hierarchy

  • AnyLock

Implemented by

Index

Methods

Methods

acquire

acquire(): Promise<boolean>

Implements lock acquire logic asynchronously

Returns: Promise<boolean>


destroy

destroy(): Promise<void>

Implements lock safe destruction asynchronously

Returns: Promise<void>


init

init(): Promise<void>

Must initialize lock asynchronously

Returns: Promise<void>


isAcquired

isAcquired(): boolean

Implements lock acquire verification asynchronously

Returns: boolean


onRelease

onRelease(handler: (channel: string) => void): void

Implements lock release handler upset

Parameters:

Name Type Description
handler (channel: string) => void

Returns: void


release

release(): Promise<void>

Implements lock release logic asynchronously

Returns: Promise<void>

Clone this wiki locally