Mutex: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: 'Perl 6' to 'Raku')
imported>Katsumi
No edit summary
Line 3: Line 3:
[[Category:Encyclopedia]]
[[Category:Encyclopedia]]


A '''mutex''' (''abbreviated'' '''Mut'''ually '''Ex'''clusive access) is a synchronization object, a variant of [[semaphore]] with ''k''=1.
A '''mutex''' (from "'''mut'''ual '''ex'''clusion") is a synchronization object, a variant of [[semaphore]] with ''k''=1.
A mutex is said to be seized by a [[task]] decreasing ''k''.
A mutex is said to be seized by a [[task]] decreasing ''k''.
It is released when the task restores ''k''. Mutexes are typically used to protect a shared resource from concurrent access.
It is released when the task restores ''k''. Mutexes are typically used to protect a shared resource from concurrent access.