--- a/DirectoryContentsBrowser.st Thu Dec 12 12:59:08 2002 +0100
+++ b/DirectoryContentsBrowser.st Thu Dec 12 13:37:29 2002 +0100
@@ -2098,14 +2098,15 @@
!
startUpdateTask
-
- | processLoop |
-
updateTask isNil ifTrue:[
- processLoop := self updateLoop.
- updateTask := processLoop newProcess.
+ updateTask := [
+ [true] whileTrue:[
+ self updateStep
+ ]
+ ] newProcess.
updateTask name:'DirectoryContentsBrowser updateTask'.
updateTask priorityRange:(Processor systemBackgroundPriority to:Processor activePriority).
+ updateTask restartable:true.
updateTask resume.
].
!
@@ -2158,30 +2159,25 @@
]
!
-updateLoop
-
- ^ [
- [true] whileTrue:[
- AbortSignal handle:[
- self debugMessage:'get an abort signal'.
- self directoryContentsChangeFlag:false.
- self filterChangeFlag:false.
- self sortBlockChangeFlag:false.
- ] do:[
- | timeOut |
- self debugMessage:'sema wait'.
- timeOut := (self changeSema waitWithTimeoutMs:(self class updateTaskCyleTime)) isNil.
- self debugMessage:'timeOut:', timeOut asString.
- (self filterChangeFlag or:[self sortBlockChangeFlag or:[self directoryChangeFlag]]) ifTrue:[
- | oldCursor |
- oldCursor := self window cursor.
- self showCursor:(Cursor execute).
- self updateBlock value:timeOut.
- self showCursor:oldCursor.
- ] ifFalse:[
- self updateBlock value:timeOut.
- ]
- ]
+updateStep
+ AbortSignal handle:[
+ self debugMessage:'get an abort signal'.
+ self directoryContentsChangeFlag:false.
+ self filterChangeFlag:false.
+ self sortBlockChangeFlag:false.
+ ] do:[
+ | timeOut |
+ self debugMessage:'sema wait'.
+ timeOut := (self changeSema waitWithTimeoutMs:(self class updateTaskCyleTime)) isNil.
+ self debugMessage:'timeOut:', timeOut asString.
+ (self filterChangeFlag or:[self sortBlockChangeFlag or:[self directoryChangeFlag]]) ifTrue:[
+ | oldCursor |
+ oldCursor := self window cursor.
+ self showCursor:(Cursor execute).
+ self updateBlock value:timeOut.
+ self showCursor:oldCursor.
+ ] ifFalse:[
+ self updateBlock value:timeOut.
]
]
! !
@@ -2710,5 +2706,5 @@
!DirectoryContentsBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.64 2002-12-06 11:48:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.65 2002-12-12 12:37:29 penk Exp $'
! !