Ignore:
Timestamp:
Oct 19, 2001, 2:20:38 PM (24 years ago)
Author:
aubourg
Message:

pb deadlock multiple fits readers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/fitstoirdr.cc

    r1696 r1710  
    128128       << firstSn << endl;
    129129
    130   fits_lock();
    131130  for (int i=0; i<nrows; i++) {
    132131    int anyNul;
    133132    double y;
     133    fits_lock();
    134134    fits_read_col_dbl(fptr,1,i+1,1,1,0,&y,&anyNul,&fstatus);
    135     //fits_unlock();
     135    fits_unlock();
    136136    int sn = (int) (y+.1);
    137137    TOIManager* mgr = TOIManager::getManager();
     
    142142      int j = colsinput[k].first;
    143143      if ( !checkOutputTOIIndex(k) )  continue;  // Reza - Si TOI non connecte
    144       //      fits_lock();
     144      fits_lock();
    145145      fits_read_col_dbl(fptr,j+1,i+1,1,1,0,&y,&anyNul,&fstatus);
    146146      long flg = 0;
     
    148148        fits_read_col_lng(fptr,j+2,i+1,1,1,0,&flg,&anyNul,&fstatus);
    149149      }
    150       //      fits_unlock();
     150      fits_unlock();
    151151      putData(k, sn, y, flg);
    152152    }
    153     if (i%50==0)  {
     153/*    if (i%50==0)  {
    154154      fits_unlock();
    155155      sched_yield();
    156156      fits_lock();
    157     }
     157    }*/
    158158    totnscount++;
    159159  }
    160   fits_unlock();
     160  //fits_unlock();
    161161  cout << "reader done reading... " << pthread_self() << endl;
    162162}
Note: See TracChangeset for help on using the changeset viewer.