The AMutex class defines an interprocess synchronization object that allows one thread mutually exclusive access to a resource.
AMutexes are useful when only one thread at a time can be allowed to modify data or some other controlled resource. For example, adding nodes to a linked list is a process that should only be allowed by one thread at a time. By using an AMutex object to control the linked list, only one thread at a time can gain access to the list.
The name Mutex comes from its usefulness in coordinating mutually-exclusive access to a shared resource. For example, to prevent two threads from writing to shared memory at the same time, each thread waits for ownership of a mutex object before executing the code that accesses the memory. After writing to the shared memory, the thread releases the mutex object.
To access a thread from another AMutex object, the programmer must use the Name of the other AMutex object.