Changeset 1874 for trunk/dll/treecnr.c
- Timestamp:
- Sep 27, 2015, 7:20:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1873 r1874 112 112 26 Sep 15 GKY Remove fInitialDriveScan code 113 113 26 Sep 15 GKY Changes to speed up ExpandAll 114 26 Sep 15 GKY Put UM_TOPDIR in the object window so it can call WaitFleshWorkListEmpty 115 while avoiding thread 1 116 27 Sep 15 GKY DosSleep times in WaitFleshWorkListEmpty set by caller 114 117 115 118 ***********************************************************************/ … … 353 356 if (!pciP || (INT)pciP == -1) { 354 357 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned pciP %p", szDir, pciP); // 2015-08-04 SHL FIXME debug 355 WaitFleshWorkListEmpty(szDirArg ); // 2015-08-23 SHL358 WaitFleshWorkListEmpty(szDirArg, 240); // 2015-08-23 SHL 356 359 break; // No match 357 360 } … … 385 388 } 386 389 } 387 WaitFleshWorkListEmpty(NULL ); // 2015-09-26 GKY Let Flesh thread catch up390 WaitFleshWorkListEmpty(NULL, 240); // 2015-09-26 GKY Let Flesh thread catch up 388 391 } // while expanding 389 392 … … 396 399 if (~pci->rc.flRecordAttr & CRA_CURSORED) { 397 400 if (collapsefirst) { 398 WaitFleshWorkListEmpty(NULL );401 WaitFleshWorkListEmpty(NULL, 240); 399 402 pciP = WinSendMsg(hwndCnr, 400 403 CM_QUERYRECORD, … … 441 444 if (maketop || fTopDir) { 442 445 if (fCollapseFirst && !quickbail) { 443 WaitFleshWorkListEmpty(NULL ); //Let the root expand first otherwise it makes top446 WaitFleshWorkListEmpty(NULL, 240); //Let the root expand first otherwise it makes top 444 447 } 445 448 // 2015-08-23 SHL FIXME debug … … 449 452 450 453 if (!quickbail) { 451 WaitFleshWorkListEmpty(szDirArg ); // 2015-08-19 SHL try to ensure contents stable454 WaitFleshWorkListEmpty(szDirArg, 240); // 2015-08-19 SHL try to ensure contents stable 452 455 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_SETRECORDEMPHASIS, CRA_SELECTED | CRA_CURSORED) szDirArg \"%s\"", szDirArg); // 2015-08-04 SHL FIXME debug 453 456 WinSendMsg(hwndCnr, … … 771 774 return 0; 772 775 776 case UM_TOPDIR: 777 if (mp1) { 778 dcd = INSTDATA(hwnd); 779 if (dcd) { 780 PCNRITEM pci = (PCNRITEM) mp1; 781 WaitFleshWorkListEmpty(pci->pszFileName, 240); 782 ShowCnrRecord(dcd->hwndCnr, (PMINIRECORDCORE) pci); 783 } 784 } 785 return 0; 786 773 787 case DM_PRINTOBJECT: 774 788 return MRFROMLONG(DRR_TARGET); … … 813 827 x++; 814 828 if (!IsFleshWorkListEmpty()) { 815 WaitFleshWorkListEmpty(NULL ); // Let it expand829 WaitFleshWorkListEmpty(NULL, 10); // Let it expand 816 830 } 817 831 fExpanding = ExpandAll(dcd->hwndCnr, x, (PCNRITEM) mp2); … … 967 981 pci = FindParentRecord(dcd->hwndCnr, pci); 968 982 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 969 WaitFleshWorkListEmpty(pci->pszFileName ); // 2015-08-19 SHL in case pci still in work list983 WaitFleshWorkListEmpty(pci->pszFileName, 240); // 2015-08-19 SHL in case pci still in work list 970 984 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 971 985 } … … 1959 1973 case UM_TOPDIR: 1960 1974 if (mp1) { 1961 PCNRITEM pci = (PCNRITEM) mp1; 1962 ShowCnrRecord(hwnd, (PMINIRECORDCORE) pci); 1975 PostMsg(dcd->hwndObject, UM_TOPDIR, mp1, MPVOID); 1963 1976 } 1964 1977 return 0; … … 2077 2090 else { 2078 2091 driveserial[x] = -1; 2079 //WaitFleshWorkListEmpty(NULL ); // 2015-08-13 SHL in case pci still in work list2092 //WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list 2080 2093 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2081 2094 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); … … 3433 3446 driveserial[toupper(*pci->pszFileName) - 'A'] != 3434 3447 volser.serial) 3435 { 3436 WaitFleshWorkListEmpty(pci->pszFileName ); // 2015-08-19 SHL in case pci still in work list3448 { 3449 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3437 3450 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3438 3451 } … … 3441 3454 driveserial[toupper(*pci->pszFileName) - 'A'] != 3442 3455 volser.serial)) { 3456 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3443 3457 if (qmsg.msg == UM_EXPANDTREE && AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh) 3444 && !dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) { 3445 DosSleep(1); 3446 WaitFleshWorkListEmpty(pci->pszFileName); 3458 && !dcd->suspendview && fTopDir) { 3447 3459 PostMsg(dcd->hwndCnr, UM_TOPDIR, MPFROMP(pci), MPVOID); 3448 3460 } … … 3452 3464 else { 3453 3465 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 3454 WaitFleshWorkListEmpty(pci->pszFileName ); // 2015-08-19 SHL in case pci still in work list3466 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3455 3467 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3456 3468 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); … … 3466 3478 DosSleep(1); 3467 3479 else { 3468 while (!IsFleshWorkListEmpty()) 3469 DosSleep(10); //Yield to Flesh thread 3480 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3470 3481 } 3471 3482 AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh); // forceFlesh 3472 if (!dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) {3483 if (!dcd->suspendview && fTopDir) { 3473 3484 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_TOPDIR %p pci %p %s", 3474 3485 // qmsg.hwnd, pci, pci->pszFileName); // 2015-08-04 SHL FIXME debug
Note:
See TracChangeset
for help on using the changeset viewer.