Exemple #1
0
int main() {
  long mid;
  thr_self(&mid);
  printf("main_tid: %d\n",mid);
  main_tid = mid;

  inline_as3("this[\"abc\"]=8888;");
  inline_as3("var af:Function = function(){};");

  avm2_ui_thunk(assign, NULL);
  avm2_ui_thunk(print, NULL);

  for(int i = 0; i < sNumThreads; i++)
    pthread_create(sThreads + i, NULL, threadProc, (void *)i);
  for(int i = 0; i < sNumThreads; i++)
    pthread_join(sThreads[i], NULL);

  AS3_GoAsync();

  return 0;
}
Exemple #2
0
int main()
{
  volatile int stop = 0;
  pthread_t thread;
  pthread_create(&thread, NULL, threadProc, (int *)&stop);
  printf("start (test duration ~91s -- ensure this amount of time will trip the script timeout in your player AND that you're running a debugger player [so you'll see the exception!])\n");
  sleep(1);
  while(!stop)
    avm2_ui_thunk(nopProc, NULL);
  pthread_join(thread, NULL);
  printf("done\n");
  return 0;
}