Ejemplo n.º 1
0
static void *startThread(void *arg) {
   ThreadData *tdp = (ThreadData *) arg;
   pthread_setspecific(getThreadDataKey(), tdp);
   try {
      tdp->fn(tdp->arg);
   } catch (ErrorException e) {
      cerr << "Error: " << e.getMessage() << endl;
      exit(1);
   }
   return NULL;
}