HEX
Server: nginx/1.18.0
System: Linux vcwordpress 5.15.0-174-generic #184-Ubuntu SMP Fri Mar 13 18:41:50 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/igsms.viitorcloud.co/igsmsportal/node_modules/es-toolkit/dist/promise/mutex.d.ts
/**
 * A Mutex (mutual exclusion lock) for async functions.
 * It allows only one async task to access a critical section at a time.
 *
 * @example
 * const mutex = new Mutex();
 *
 * async function criticalSection() {
 *   await mutex.acquire();
 *   try {
 *     // This code section cannot be executed simultaneously
 *   } finally {
 *     mutex.release();
 *   }
 * }
 *
 * criticalSection();
 * criticalSection(); // This call will wait until the first call releases the mutex.
 */
declare class Mutex {
    private semaphore;
    /**
     * Checks if the mutex is currently locked.
     * @returns {boolean} True if the mutex is locked, false otherwise.
     *
     * @example
     * const mutex = new Mutex();
     * console.log(mutex.isLocked); // false
     * await mutex.acquire();
     * console.log(mutex.isLocked); // true
     * mutex.release();
     * console.log(mutex.isLocked); // false
     */
    get isLocked(): boolean;
    /**
     * Acquires the mutex, blocking if necessary until it is available.
     * @returns {Promise<void>} A promise that resolves when the mutex is acquired.
     *
     * @example
     * const mutex = new Mutex();
     * await mutex.acquire();
     * try {
     *   // This code section cannot be executed simultaneously
     * } finally {
     *   mutex.release();
     * }
     */
    acquire(): Promise<void>;
    /**
     * Releases the mutex, allowing another waiting task to proceed.
     *
     * @example
     * const mutex = new Mutex();
     * await mutex.acquire();
     * try {
     *   // This code section cannot be executed simultaneously
     * } finally {
     *   mutex.release(); // Allows another waiting task to proceed.
     * }
     */
    release(): void;
}

export { Mutex };