In order to process synchronous messages as swiftly as possible, PM always checks the receive list of the current thread for pending SMSs before waiting on an internal PM semaphore.
If SMSs are found queued, they are successively dispatched.
Only when the receive list has been processed does PM finally wait on a semaphore.
This applies particularly to the message processing semaphore, but also equally to semaphores that serialise access to resources such as the .INI files.