title: Why is locking a std::mutex twice 'Undefined Behaviour'?
body: <p>As per this <a href="http://www.devx.com/SpecialReports/Article/38883/1954">article</a>:</p>
  
  <blockquote>
    <p>If you try and lock a non-recursive mutex twice from the same thread without unlocking in between, you get undefined behavior.</p>
  </blockquote>
  
  <p>My very naive mind tells me why don't they just return an error? Is there a reason why this has to be UB?</p>