A mutex object facilitates protection against data races and allows safe synchronization of
data between execution agents.
An execution agent owns
a mutex from the time it successfully calls one of the
lock functions until it calls unlock.
Mutexes can be either recursive or non-recursive, and can
grant simultaneous ownership to one or many execution agents.
recursive and non-recursive mutexes are supplied.