Skip to content

Commit

Permalink
Merge pull request preslavmihaylov#17 from Ak3161/fix/typos
Browse files Browse the repository at this point in the history
Corrected the typos and some grammetical mistakes.
  • Loading branch information
preslavmihaylov authored Oct 6, 2024
2 parents 5556683 + 2fa341c commit 0db6366
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 0db6366

Please sign in to comment.