setTreeObserver(tm, &tob);
setTreeObserverTM(tm, &tob);
int calcThreadFunc(void *unused){  for (;;) {    if (distmatglob == NULL) {      sleepMillis(40);      continue;    }    if (tm == NULL && curFiles != NULL && curFiles->size >= 4) {      int dmsize;      fIsCalculatingDM = 1;      for (;;) {        dmsize = getSizeIDM(distmatglob);        if (dmsize < sizeSS(labels))          addAndProcessDataBlock(distmatglob, &curFiles->db[dmsize]);        else          break;      }      fIsCalculatingDM = 0;      assert(distmatglob);      if (getSizeIDM(distmatglob) < 4) {        sleepMillis(40);        continue;      }      tm = newTreeMaster(getDistMatrixIDM(distmatglob), 0);      nextbest = getCurTree(getStarterTree(tm));      setTreeObserver(tm, &tob);    }    if (tm) {      findTree(tm);    }    else {      sleepMillis(40);  /* display help / status info here */    }  }  return 0;}