title: Stage3D and pthreads
body: <p>So I downloaded flascc, and messed around with the sample.</p>
  
  <p>sample 09 (threads) and sample 12 (stage3D) worked well by themselves, but when I tried to run threads in Stage3D sample, they were never started.</p>
  
  <p>Here's a code I have in main()</p>
  
  <pre><code>pthread_t thread;
  printf("Start a thread");
  int val = pthread_create(&amp;thread, NULL, threadProc, NULL);
  
  
  // Setup the stage
  stage = internal::get_Stage();
  stage-&gt;scaleMode = flash::display::StageScaleMode::NO_SCALE;
  stage-&gt;align = flash::display::StageAlign::TOP_LEFT;
  stage-&gt;frameRate = 60;
  
  // Ask for a Stage3D context to be created
  s3d = var(var(stage-&gt;stage3Ds)[0]);
  s3d-&gt;addEventListener(flash::events::Event::CONTEXT3D_CREATE, Function::_new(initContext3D, NULL));
  s3d-&gt;addEventListener(flash::events::ErrorEvent::ERROR, Function::_new(context3DError, NULL));
  s3d-&gt;requestContext3D(flash::display3D::Context3DRenderMode::AUTO,
                        flash::display3D::Context3DProfile::BASELINE_CONSTRAINED);
  
  
  // Suspend main() and return to the Flash runloop
  AS3_GoAsync();
  </code></pre>
  
  <p>and here's the function</p>
  
  <pre><code>void *threadProc(void *arg)
  {
        printf("From a thread!");
  }
  </code></pre>
  
  <p>threadProc never gets executed.</p>
  
  <p>I found <a href="http://www.adobe.com/devnet-docs/flascc/docs/Reference.html#section_concurrency" rel="nofollow">this</a> manual page, but I don't think there's anything there. What am I missing?</p>