title: pthread mutex two threads interchangebly locks/unlocks is it valid approach?
body: <p>I read that the mutex should be unlocked by same thread that has locked it. Let us consider the following Scenario. </p>
  
  <p>I have a mutex variable say <code>myMute</code>, <code>T1</code>, <code>T2</code> are two threads.</p>
  
  <ol>
  <li><p><code>T1</code> locks the <code>myMute</code>.</p></li>
  <li><p><code>T2</code> unlocks <code>myMute</code>.</p></li>
  <li><p><code>T2</code> locks <code>myMute</code>.</p></li>
  <li><p><code>T1</code> unlocks <code>myMute</code>.</p></li>
  </ol>
  
  <p>Is this ordered locking/unlocking from different threads a valid approach?</p>