title: iPhone: starting an NSThread from a C++ object
body: <p>I'm writing a game for the iPhone. Almost all the code is written in C++. Now I'd like to create a new thread using NSThread (I want to use the runLoop).</p>
  
  <p>It's possible to mix objective-C and C++ if the code is written in a .mm file, which I did.</p>
  
  <p>The problem is, that for creating a NSThread</p>
  
  <pre><code>NSThread* myThread = [[NSThread alloc] initWithTarget:self selector:@selector(workerThreadFunction:) object:nil];
  [myThread start]; 
  </code></pre>
  
  <p>I need to pass "self" which (as far as I understand it) an Objective-C "id" - and a c++ object is not an objective-c object.</p>
  
  <p>So - is there a way to use NSThread in a c++ aplication or am I forced to use pthreads?</p>
  
  <p>Thanks!</p>