In a multitasking world it can be difficult to make sure that synchronisation and/or queuing is properly performed. In Trainz each thread is running all the time, even if it is blocked/sleeping it is still there and can come alive to do some work. An example would be an industry waiting for a consist to enter its area, the process is 'asleep' but as soon as the consist triggers the industry it will start running again.
The ability to queue and lockout competing tasks in the windows work is called a mutex (Mutually Exclusive) another name is a semaphore and like a train one it means stop the track is busy.
Using the library there are various times when having multiple threads doing the same thing, like creating a consist, will cause too much overhead and possibly crash trainz outright. Mutex is used in various places in the library to ensure too many threads are not overloading the trainz core.
You have the ability to use mutex yourself. For example you have a signal locked until something happens that releases the lock.
Be aware that you can lock yourself up if you are not careful.
In the library the Mutex code is access by using the RBRMutex class.