Skip to content

Commit

Permalink
modify 'defer mu.Lock()' to 'defer mu.Unlock()' in question/q015.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sulenn committed Mar 13, 2020
1 parent 201fb88 commit 5309828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions question/q015.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {
}
func A() {
mu.Lock()
defer mu.Lock()
defer mu.Unlock()
chain = chain + " --> A"
B()
}
Expand All @@ -29,7 +29,7 @@ func B() {
}
func C() {
mu.Lock()
defer mu.Lock()
defer mu.Unlock()
chain = chain + " --> C"
}
```
Expand Down

0 comments on commit 5309828

Please sign in to comment.