19.2.1 • Published 8 months ago

@devlearning/mutex-fast-lock v19.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

CnetMutexFastLock

Usage example

    mutexFastLockSvc.lock('sessionId').then(stats => {
        // a lock has now been acquired
        localStorage.setItem('sessionId', sessionId);
    
        {
            restartCount: 0, // the number of times the lock process restarted
            locksLost: 0, // the number of times the lock lost to another process
            contentionCount: 0, // the number of times contending for a lock
            acquireStart: 1473872633183, // timestamp when acquisition request started
            acquireEnd: 1473872633186, // timestamp when acquisition request fulfilled
            acquireDuration: 3, // the total time taken to acquire the lock (in ms)
        }

        // release the lock when you're done.
        mutex.release('sessionId');

    }).catch((err) => {
        // ...
    })
19.2.1

8 months ago

17.3.7

1 year ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago