From eac8e9dfab7c2da865763b874f49d436676d07a2 Mon Sep 17 00:00:00 2001 From: Asiel Leal Celdeiro <15990580+lealceldeiro@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:02:25 +0300 Subject: [PATCH] Fix typ --- JavaConcurrencyInPractice/Chapter03/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JavaConcurrencyInPractice/Chapter03/README.md b/JavaConcurrencyInPractice/Chapter03/README.md index 31e3339..fb5e950 100644 --- a/JavaConcurrencyInPractice/Chapter03/README.md +++ b/JavaConcurrencyInPractice/Chapter03/README.md @@ -42,7 +42,7 @@ You can use volatile variables only when all the following criteria are met: * Writes to the variable do not depend on its current value, or you can ensure hat only a single thread ever updates the value; * The variable does not participate in invariants with other state variables; and -* ocking is not required for any other reason while the variable is being accessed. +* Locking is not required for any other reason while the variable is being accessed. ## 3.2 Publication and escape @@ -63,7 +63,7 @@ Passing an object to an alien method must also be considered publishing that obj will actually be invoked, you don’t know that the alien method won’t publish the object or retain a reference to it that might later be used from another thread. -An object or its internal state is also published when an inner class instance is pusblished, because the inner +An object or its internal state is also published when an inner class instance is published, because the inner class instances contain a hidden reference to the enclosing instance. i.e.: ```java