Enables or disables the internal operation of the mutex.
Controls whether the mutex is allowed to perform lock and unlock operations internally. When disabled, synchronization calls are ignored according to the internal policy of the mutex.
This is useful in specific cases such as a controlled shutdown, debugging or single-thread environments.
While disabled, Lock is ignored only for a thread that does not hold the mutex. A thread that already holds it keeps counting its nested locks, and Unlock only releases a lock of the calling thread. So every Unlock pairs with its own Lock, even when the permit changes in between. Until 2026-10-11 the nested Lock did not count, and its Unlock released the outer lock.