IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 10, 2010, 5:09:27 PM (16 years ago)
Author:
Paul Price
Message:

Adding mutex on psImageConvolveSetThreads to attempt to fix sporadic errors, e.g. 'Couldn't find thread task PSLIB_IMAGE_CONVOLVE_MASK'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r26892 r27908  
    3737
    3838
     39
    3940static bool threaded = false;           // Run image convolution threaded?
    40 
    41 
     41static pthread_mutex_t threadMutex = PTHREAD_MUTEX_INITIALIZER;
    4242
    4343
     
    16791679bool psImageConvolveSetThreads(bool set)
    16801680{
     1681    psMutexLock(threadMutex);
    16811682    bool old = threaded;                // Old value
    16821683    if (set && !threaded) {
     
    17111712    }
    17121713    threaded = set;
     1714    psMutexUnlock(threadMutex);
    17131715    return old;
    17141716}
Note: See TracChangeset for help on using the changeset viewer.