IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 11, 2012, 10:16:48 AM (14 years ago)
Author:
bills
Message:

Fix problems with IPP threading. In psThreadPoolWait wait until all threads have
finished before returning even if one of the threads has a fault.
Return false if any thread faults. Also add a new argument bool harvestOnFailure
which tells psThreadPoolWait to harvest the done jobs if there is a failure.
Many functions previously used psThreadPoolWait(harvest = false) because they
wanted to examine the jobs structs afterwards. However they weren't cleaning up the
jobs in the failure case.
These now call psThreadPoolWait(harvest = false, harvestOnFailure = true)
which causes the jobs to be cleaned up on fault. These lingering jobs were the
cause of the "Unknown task" failure in psImageConvolve*
Also changed psphotReadout to check for failure of psphotGuessModels and return
to the caller. This yields quality = 3007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psThread.h

    r28405 r33089  
    116116/// Wait for the thread pool to finish
    117117///
    118 /// This function blocks (waits in usleep) until either an error is detected on one of the threads or until ll
    119 /// threads are idle and no jobs are left on the queue
    120 bool psThreadPoolWait(bool harvest      // Harvest the jobs from the queue?
     118/// This function blocks (waits in usleep) until all  threads are idle and no jobs
     119/// are left on the queue
     120/// returns success if all jobs return success, otherwise returns false
     121bool psThreadPoolWait(bool harvest,         // Harvest the jobs from the queue?
     122                      bool harvestOnFailure // If harvest is false, harvest the jobs if a failure is encountered
    121123    );
    122124
Note: See TracChangeset for help on using the changeset viewer.