Skip to content

Commit

Permalink
Corrected the typos and some grammertical mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ak3161 committed Oct 6, 2024
1 parent 5556683 commit 2fa341c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/java-concurrency-in-practice/chapter-04/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To ensure thread-safety, compound actions involving updating the bounds need to

On the other hand, if there is a field whose value doesn't depend on its own state, synchronization can be relaxed to achieve better performance.

But in sum, one must understand a class' invariants first, before designing it for thread-safety.
But in sum, one must understand a class's invariants first, before designing it for thread-safety.

## State-dependent operations

Expand Down Expand Up @@ -184,7 +184,7 @@ Whether you want this behavior or not is based on requirements.
The java monitor pattern is useful when writing a class composed of non-thread-safe objects.
If the class, however, is composed of thread-safe objects you might get away with not using any synchronization at all.
But in some cases, extra synchronization is needed even if all fields are thread-safe.
However, in some cases, extra synchronization is needed even if all fields are thread-safe.
Example of delegating thread-safety & not using any explicit synchronization:
```java
Expand Down

0 comments on commit 2fa341c

Please sign in to comment.