Skip to content

Commit

Permalink
Fix minor code typos in concurrency.
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed Feb 10, 2013
1 parent 8a2ae8a commit 16552c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/concurrency.textile
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ h3. Three tools

h4. synchronization

Mutexes provide ownership semantics. When you enter a mutex, you own it. The most common way of using a mutex in the JVM is by synchronizing on something. In this case, we'll synchronize on our userMap.
Mutexes provide ownership semantics. When you enter a mutex, you own it. The most common way of using a mutex in the JVM is by synchronizing on something. In this case, we'll synchronize on our Person.

In the JVM, you can synchronize on any instance that's not null.

Expand Down Expand Up @@ -449,7 +449,7 @@ abstract class Consumer[T](queue: BlockingQueue[T]) extends Runnable {

val queue = new LinkedBlockingQueue[String]()

// One thread for the consumer
// One thread for the producer
val producer = new Producer[String]("users.txt", q)
new Thread(producer).start()

Expand Down

0 comments on commit 16552c4

Please sign in to comment.