src/worker.cc
// Use pthreads to create a system thread.
Use pthreads to create a system thread.
Use pthreads to create a system thread .
int WorkerThread::SpawnThread() {
  int result = pthread_create(&thread_, NULL, thread_spawner_, this);
  if (result) {
    char buf[256];
    sat_strerror(result, buf, sizeof(buf));
    logprintf(0, "Process Error: pthread_create "
                  "failed - error %d %s\n", result,
              buf);
    status_ = false;
    return false;
  }
  return true;
}
int WorkerThread :: SpawnThread ( ) { int result = pthread_create ( & thread_ , NULL , thread_spawner_ , this ) ; if ( result ) { char buf [ 256 ] ; sat_strerror ( result , buf , sizeof ( buf ) ) ; logprintf ( 0 , " " " \n " , result , buf ) ; status_ = false ; return false ; } return true ; }
Use pthreads to create a system thread.
Use pthreads to create a system thread .
// Create the new thread. // 0 is pthreads success.