Mutex
class in package klyn.threading

    public class Mutex extends Object implements AutoClosable:

Object
└ Mutex
All Implemented Interfaces: AutoClosable

Mutual exclusion primitive.

`lock()` acquires the mutex and returns an AutoClosable guard to support:

    try mutex.lock():
    # critical section
    pass

Inherited Properties
property Inherited Properties from Object: type
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | close `close() as Void:` | AutoClosable support for try-with-resources.
public | lock `lock() as Mutex:` | Acquires the mutex and returns a guard that unlocks on `close()`.
public | unload `unload() as Void:` | Alias for unlock (kept for compatibility with older naming).
public | unlock `unlock() as Void:` | Releases the mutex.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
method Inherited Methods from AutoClosable: close