https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags
This commit is contained in:
@ -5,13 +5,13 @@ folder: mutex
|
||||
permalink: /patterns/mutex/
|
||||
categories: Concurrency
|
||||
tags:
|
||||
- Java
|
||||
- Difficulty-Intermediate
|
||||
- Decoupling
|
||||
---
|
||||
|
||||
## Also known as
|
||||
Mutual Exclusion Lock
|
||||
Binary Semaphore
|
||||
|
||||
* Mutual Exclusion Lock
|
||||
* Binary Semaphore
|
||||
|
||||
## Intent
|
||||
Create a lock which only allows a single thread to access a resource at any one instant.
|
||||
@ -22,8 +22,8 @@ Create a lock which only allows a single thread to access a resource at any one
|
||||
## Applicability
|
||||
Use a Mutex when
|
||||
|
||||
* you need to prevent two threads accessing a critical section at the same time
|
||||
* concurrent access to a resource could lead to a race condition
|
||||
* You need to prevent two threads accessing a critical section at the same time
|
||||
* Concurrent access to a resource could lead to a race condition
|
||||
|
||||
## Credits
|
||||
|
||||
|
Reference in New Issue
Block a user