#DOCUMENTATION by stefan
class: Registry
comment/format in: #unregisterAllForWhich:
--- a/Registry.st Thu Mar 26 15:05:07 2020 +0100
+++ b/Registry.st Fri Mar 27 16:20:00 2020 +0100
@@ -328,23 +328,25 @@
self removeKey:anObject ifAbsent:[].
!
-unregisterAllForWhich:aBlock
- "remove registration of all entries, for which the argument block
- evaluates to true.
- should be sent, if we are no more interested in destruction of
+unregisterAllForWhich:aOneArgBlock
+ "remove registration of all entries, for which the argument,
+ aOneArgBlock evaluates to true.
+ Should be sent, if we are no more interested in destruction of
a group of objects (i.e. it no longer holds external resources)."
- |wasBlocked any|
+ |wasBlocked anyRemoved|
wasBlocked := OperatingSystem blockInterrupts.
keyArray validElementsDo:[:eachObject|
- (eachObject ~~ DeletedEntry and:[aBlock value:eachObject]) ifTrue:[
+ (eachObject ~~ DeletedEntry and:[aOneArgBlock value:eachObject]) ifTrue:[
self safeRemoveKey:eachObject.
- any := true.
+ anyRemoved := true.
].
].
- any ifTrue:[ self possiblyShrink ].
+ anyRemoved ifTrue:[ self possiblyShrink ].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+
+ "Modified (comment): / 27-03-2020 / 15:51:15 / Stefan Vogel"
!
unregisterAllForWhichHandle:aBlock