Changeset 1873 for trunk/dll/flesh.c


Ignore:
Timestamp:
Sep 26, 2015, 7:23:13 PM (10 years ago)
Author:
Gregg Young
Message:

Adjustments to ShowTreeRec to eliminate failures and reduce retries and container noise on tree switches. Remove fInitialDriveScan code. Changes to speed up ExpandAll. WaitFleshWorkListEmpty now gives error message and returns if semaphore request fails more than 5 consecutive times.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/flesh.c

    r1871 r1873  
    4141                complete container item. Add a flag to indicate when a directory needed to be
    4242                Fleshed
     43  26 Sep 15 GKY Changes to speed up ExpandAll
     44  26 Sep 15 GKY WaitFleshWorkListEmpty now gives error message and returns if semaphore request
     45                fails more than 5 consecutive times.
    4346
    4447***********************************************************************/
     
    7477#include "common.h"                     // IncrThreadUsage DecrThreadUsage
    7578#include "pathutil.h"
     79#include "treecnr.h"                    // fExpandAll
    7680#if 0
    7781#define  __PMPRINTF__
     
    863867  BOOL waited;
    864868  PCSZ pszSavedFleshFocusPath;
     869  INT rcCount = 0;
    865870
    866871  if (tid == 1 || tid == tidFleshWorkListThread) {
     
    902907    if (pszDirName) {
    903908      rc = xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT);
    904       if (rc)
    905         continue;                       // Maybe should return ???
     909      if (rc) {
     910        rcCount++;
     911        if (rcCount < 6)
     912          continue;                     // Maybe should return ???
     913        else {
     914          Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     915                    PCSZ_DOSREQUESTMUTEXSEM);
     916          return;
     917        }
     918
     919      }
    906920
    907921      if (!pathSaved) {
     
    915929
    916930      xDosReleaseMutexSem(hmtxFleshWork);
     931      rcCount = 0;
    917932
    918933      if (!item) {
    919934        if (waited)
    920           DosSleep(100);                // Let PM do some work
     935          DosSleep(fExpandAll ? 1 : 240);               // Let PM do some work
    921936        break;                          // Dependents gone from work list
    922937      }
    923938    } // if pszDirName
    924 
    925     DosSleep(250);
     939    DosSleep(fExpandAll ? 10 : 250);
    926940  } // for
    927941
Note: See TracChangeset for help on using the changeset viewer.