Padlock works to prevent unexpected code execution when dealing with asynchronous callbacks without blocking. Call a function with lock to execute it as soon as a lock can be attained, and unlock it at all of your possible callback end-points. Use the same lock on other functions that you don't want to interrupt. Code will execute in order as the lock can be acquired.
Want to see pretty graphs? Log in now!
npm install padlock
|4||downloads in the last week|
|25||downloads in the last month|
|Version||1.1.2 last updated 3 years ago|
|Keywords||lock, flow, control, flow-control, acquire, release, synchronous, asynchronous|
|Dependents||deputydb, dulcimer, verymodel-level|