title: objective-c : @synchronized, how does it work?
body: <p>i have two methods</p>
  
  <pre><code>-(void) a {
     @synchronized(self) {
        // critical section 1 
     }
  }
  
  -(void) b {
     @synchronized(self) {
        // critical section 2 
     }
  }
  </code></pre>
  
  <p>now my question is if a thread is in critical section 1. will the critical section 2 be locked for other threads or other threads can access critical section 2.</p>