Skip to content

Conversation

kgullion
Copy link

@kgullion kgullion commented Mar 6, 2021

Takes any function and wraps that function in a runExclusive so that any future calls to the wrapped function are deferred.

eg
const wrappedLog = lock.wrap(console.log) const release = lock.aquire() wrappedLog("this won't print until release is called") setTimeout(release, 1000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant