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.
npm install padlock
|1||downloads in the last day|
|6||downloads in the last week|
|22||downloads in the last month|
|Version||1.1.2 last updated 2 years ago|
|Keywords||lock, flow, control, flow-control, acquire, release, synchronous, asynchronous|