Skip to content

Commit 085986d

Browse files
authored
Update multithreading.md
1 parent 0dc2ffd commit 085986d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/multithreading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void function1()
425425
}
426426
}
427427
```
428-
This will solve the problem but we might create other problems. The first problem is if for any reason mutrx doesn't get unclocked, our program will get stock forever.
428+
This will solve the problem but we might create other problems. The first problem is if for any reason mutex doesn't get unclocked, our program will get stock forever.
429429

430430
Here when gaurd goes out of scope, mutex get unlocked automatically:
431431
```
@@ -437,7 +437,7 @@ void sharedPrinter(std::string s,int id)
437437
}
438438
```
439439
But the other problem is that `std::cout` might be still manipulated outside of code and it is not still under protection of mutex.
440-
Full example [here](mutex.cpp).
440+
Full example [here](../src/multithreading/mutex.cpp).
441441

442442

443443
# Thread Safe Functions

0 commit comments

Comments
 (0)