title: Why does this double mutex lock not cause deadlock?
body: <p>I test c++11 mutex in my centos computer.  I try to double lock this mutex to make deadlock. But after I run it, everything is fine and no deadlock occurs.</p>
  
  <pre><code>#include &lt;thread&gt;
  #include &lt;mutex&gt;
  #include &lt;iostream&gt;
  std::mutex m;
  int main()
  {
    m.lock();
    m.lock();
    std::cout&lt;&lt;"i am ok"&lt;&lt;std::endl;
  
    return 0;  
  }
  </code></pre>
  
  <p>The compiler is g++ 4.8.5 in centos 3.10.0-327.36.3.el7.x86_64: </p>
  
  <pre><code>[zzhao010@localhost shareLibPlay]$ ./3.out
  i am ok
  </code></pre>