--- a/HierarchicalFileList.st Sun Jul 29 10:16:35 2018 +0200
+++ b/HierarchicalFileList.st Sun Jul 29 10:18:22 2018 +0200
@@ -225,7 +225,7 @@
!
root:aRoot
- self criticalDo:[
+ self synchronized:[
indicatorList notNil ifTrue:[
indicatorList do:[:el| el resetFetchIndicator ].
indicatorList removeAll.
@@ -235,6 +235,8 @@
self showRoot ifFalse:[aRoot setExpanded:true ]
].
^ super root:aRoot
+
+ "Modified: / 28-07-2018 / 15:48:43 / Claus Gittinger"
! !
!HierarchicalFileList methodsFor:'actions'!
@@ -251,7 +253,7 @@
matchBlock := aBlock.
root notNil ifTrue:[
- self criticalDo:[
+ self synchronized:[
self stopMonitoringTask.
root matchBlockChanged.
].
@@ -259,6 +261,7 @@
].
"Modified: / 23-07-2018 / 13:24:06 / Stefan Vogel"
+ "Modified: / 28-07-2018 / 15:48:38 / Claus Gittinger"
!
sortBlock
@@ -287,8 +290,8 @@
sortBlock:aBlock
sortBlock := aBlock.
- root notNil ifTrue:[
- self criticalDo:[
+ self synchronized:[
+ root notNil ifTrue:[
self stopMonitoringTask.
root recursiveSort:aBlock.
].
@@ -296,6 +299,7 @@
].
"Modified: / 23-07-2018 / 13:24:17 / Stefan Vogel"
+ "Modified: / 28-07-2018 / 15:48:54 / Claus Gittinger"
! !
!HierarchicalFileList methodsFor:'private-monitoring task'!
@@ -454,9 +458,9 @@
startIndicatorValidationFor:anItem
"an item will be registered for an indication update"
- |prio|
+ self synchronized:[
+ |prio|
- self criticalDo:[
indicatorList size == 0 ifTrue:[
indicatorList := OrderedCollection new.
] ifFalse:[
@@ -479,17 +483,21 @@
indicatorTask resume.
]
].
+
+ "Modified (format): / 28-07-2018 / 15:49:06 / Claus Gittinger"
!
stopIndicatorValidationFor:anItem
"stop the indicator validation for an item"
- self criticalDo:[
+ self synchronized:[
indicatorList notNil ifTrue:[
indicatorList removeIdentical:anItem ifAbsent:nil.
anItem resetFetchIndicator.
]
].
+
+ "Modified: / 28-07-2018 / 15:49:15 / Claus Gittinger"
!
updateIndicatorCycle
@@ -505,7 +513,7 @@
[
[ task notNil ] whileTrue:[
- self criticalDo:[
+ self synchronized:[
( dependents size ~~ 0 "/ no dependencies (stop task)
and:[indicatorList size ~~ 0] "/ nothing to do
) ifTrue:[
@@ -528,7 +536,7 @@
] ifCurtailed:[
task notNil ifTrue:[
"/ oops, process terminated
- self criticalDo:[
+ self synchronized:[
"/ test whether a new task already started
indicatorTask == task ifTrue:[
indicatorTask := nil
@@ -538,6 +546,7 @@
].
"Modified: / 27-02-2007 / 11:49:07 / cg"
+ "Modified: / 28-07-2018 / 15:51:30 / Claus Gittinger"
! !
!HierarchicalFileList::HierarchicalFileItem class methodsFor:'instance creation'!
@@ -929,10 +938,12 @@
model := self model.
model isNil ifTrue:[ ^ nil ].
- model criticalDo:[
+ model synchronized:[
children isNil ifTrue:[ self readChildren ].
].
^ children
+
+ "Modified: / 28-07-2018 / 15:49:26 / Claus Gittinger"
!
icon
@@ -1384,7 +1395,7 @@
^ self
].
- model criticalDo:[
+ model synchronized:[
addedItems := OrderedCollection new:128.
unusedDict := Dictionary new:size.
@@ -1412,6 +1423,7 @@
].
"Modified (format): / 25-01-2018 / 12:03:40 / mawalch"
+ "Modified: / 28-07-2018 / 15:49:41 / Claus Gittinger"
!
updateList