@ethereumjs/util / Lock
Defined in: packages/util/src/lock.ts:2
new Lock():
Lock
Lock
acquire():
Promise
<boolean
>
Defined in: packages/util/src/lock.ts:10
Returns a promise used to wait for a permit to become available. This method should be awaited on.
Promise
<boolean
>
A promise that gets resolved when execution is allowed to proceed.
release():
void
Defined in: packages/util/src/lock.ts:25
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.
void