mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 10:54:44 +00:00
feat(monorepo): migrate vue packages and apply oxlint refactors
This commit is contained in:
@@ -2,19 +2,19 @@
|
||||
* @name SyncMutex
|
||||
* @category Utils
|
||||
* @description A simple synchronous mutex to provide more readable locking and unlocking of code blocks
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* const mutex = new SyncMutex();
|
||||
*
|
||||
*
|
||||
* mutex.lock();
|
||||
*
|
||||
* mutex.unlock();
|
||||
*
|
||||
*
|
||||
* const result = await mutex.execute(() => {
|
||||
* // do something
|
||||
* return Promise.resolve('done');
|
||||
* return Promise.resolve('done');
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @since 0.0.5
|
||||
*/
|
||||
export class SyncMutex {
|
||||
|
||||
Reference in New Issue
Block a user