Changeset 1570 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Jun 13, 2011, 12:09:19 AM (14 years ago)
Author:
Gregg Young
Message:

Added IdleIfNeeded to place load and free loops to idle priority when dealing with large numbers of items. Used SleepIfNeeded more places for a similar purpose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r1554 r1570  
    5555  20 Nov 10 GKY Check that pTmpDir IsValid and recreate if not found; Fixes hangs caused
    5656                by temp file creation failures.
     57  12 Jun 11 GKY Added SleepIfNeeded in the container fill loop
    5758
    5859***********************************************************************/
     
    9697#include "excputil.h"                   // xbeginthread
    9798#include "pathutil.h"                   // AddBackslashToPath
     99#include "tmrsvcs.h"
    98100
    99101typedef struct
     
    267269    PFILEFINDBUF4L pffbFile;
    268270    ULONG x;
    269 
     271    ITIMER_DESC itdSleep = { 0 };               // 30 May 11 GKY
     272
     273    InitITimer(&itdSleep, 500);
    270274    while (!rc) {
    271275
     
    303307      DosError(FERR_DISABLEHARDERR);
    304308      rc = xDosFindNext(hdir, pffbArray, ulBufBytes, &ulFindCnt, FIL_QUERYEASIZEL);
     309      SleepIfNeeded(&itdSleep, 1);
    305310    } // while more found
    306311
Note: See TracChangeset for help on using the changeset viewer.