Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-m-masood committed Jul 21, 2024
1 parent 40bb736 commit 5968478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/posts/why-is-concurrency-hard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ The program above fulfills all of the conditions. Hence the reason for having a
# Livelock

A very famous example of a livelock would be the following:
Imagine you were in a tight corridor. There just enough space for two people to walk. You come face to face with another person. You move left, the other person moves left as well in an attempt to walk by. You move, right, the other person moves right as well. Both people become stuck in this state of hallway shuffle moving left and right continuously!
Imagine you were in a tight corridor. There is just enough space for two people to walk. You come face to face with another person. You move left, the other person moves left as well in an attempt to walk by. You move right, the other person moves right as well. Both people become stuck in this state of hallway shuffle moving left and right continuously!

This occurs when two goroutines or concurrent processes are trying to prevent deadlock but without any communication. Livelocks are especially difficult to spot because your program can seem like it is doing work but in actuality it is just burning rubber.

Expand Down

0 comments on commit 5968478

Please sign in to comment.