@proto-kit/sequencer • Docs


Documentation / @proto-kit/sequencer / ensureNotBusy

Function: ensureNotBusy()

ensureNotBusy<T>(): <R>(_target, methodName, descriptor) => void

Decorator that ensures a function/method is not currently in use. Mostly useful for production of blocks, batches and tasks.

Type Parameters

• T

Returns

Function

Type Parameters

• R

Parameters

• _target: T

• methodName: string

• descriptor: TypedPropertyDescriptor<(…args) => Promise<undefined | R>>

Returns

void

Defined in

packages/sequencer/src/helpers/BusyGuard.ts:6