Skip to content

Latest commit

 

History

History
55 lines (29 loc) · 1.01 KB

File metadata and controls

55 lines (29 loc) · 1.01 KB

@ethereumjs/util / Lock

Class: Lock

Table of contents

Constructors

Methods

Constructors

constructor

new Lock()

Methods

acquire

acquire(): Promise<boolean>

Returns a promise used to wait for a permit to become available. This method should be awaited on.

Returns

Promise<boolean>

A promise that gets resolved when execution is allowed to proceed.

Defined in

packages/util/src/lock.ts:10


release

release(): void

Increases the number of permits by one. If there are other functions waiting, one of them will continue to execute in a future iteration of the event loop.

Returns

void

Defined in

packages/util/src/lock.ts:25