0

Let's set up the context: C++, Linux

I cannot get the difference between a mutex and monitor. I know, that monitor uses internally mutex but why we take care of? I know, that monitor provides condition_variable and it makes possible to inform waiting other threads but, after all mutex also provide it in fact.

(*) I mean, when make mutex.unlock then operating system will awake sleeping other threads on that mutex: "Hi, you can continue your job, mutex is free".

I highlight with * a part of my post becaue I am not sure if I reason correctly.(?)

Please help me

Gilgamesz
  • 4,727
  • 3
  • 28
  • 63
  • Possible duplicate of [Mutexes vs Monitors - A Comparison](http://stackoverflow.com/questions/7669541/mutexes-vs-monitors-a-comparison) – Patrick Trentin Apr 24 '16 at 12:14
  • Take a look at these http://stackoverflow.com/questions/301160/what-are-the-differences-between-various-threading-synchronization-options-in-c and http://stackoverflow.com/questions/7669541/mutexes-vs-monitors-a-comparison .. it former refers to a different language but I think it still makes some valid points. – Patrick Trentin Apr 24 '16 at 12:16

0 Answers0