Skip to content

Commit

Permalink
Merge pull request twitter#151 from LuqiPan/master
Browse files Browse the repository at this point in the history
Fixed a tiny wording issue
  • Loading branch information
benpence committed Sep 16, 2015
2 parents 48c561f + 090bfd2 commit 34764ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/concurrency.textile
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ h2(#solutions). Let's make it safe

In our inverted index example above, userMap is not guaranteed to be safe. Multiple clients could try to add items at the same time and have the same kinds of visibility errors we saw in our first @Person@ example.

Since userMap isn't thread-safe, how we do we keep only a single thread at a time mutating it?
Since userMap isn't thread-safe, how do we keep only a single thread at a time mutating it?

You might consider locking on userMap while adding.

Expand Down

0 comments on commit 34764ff

Please sign in to comment.