Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const lock = hazelcast.getLock('my-distributed-lock')
- lock.lock().then(() => {
- // the execution of this function will happen once
- // at a time across all distributed instances
- // ...
- console.log('Happy Locking!')
- }).finally(() => lock.unlock())
Add Comment
Please, Sign In to add comment