Mutex: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: 'Perl 6' to 'Raku') |
imported>Katsumi No edit summary |
||
Line 3: | Line 3: | ||
[[Category:Encyclopedia]] |
[[Category:Encyclopedia]] |
||
A '''mutex''' ( |
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. |