title: (iphone) how to set 'atomic' @property for a variable?
body: <p>I want to use an integer variable from multiple threads.<br>
  Hence I want to make getter/setter atomic operation.  </p>
  
  <p>at header file  </p>
  
  <pre><code>@property (retain) NSNumber* myNumber;
  </code></pre>
  
  <p>at implementation file  </p>
  
  <pre><code>@synthesize myNumber; 
  </code></pre>
  
  <p>won't compile, what am i missing?<br>
  (type of property ‘myNumber’ does not match type of ivar ‘myNumber’)<br>
  - edit, I declared it as int myNumber; compilation problem solved</p>
  
  <p>Also, can I use plain int for this? (not NSNumber* )</p>