class: SharedCollection
authorStefan Vogel <sv@exept.de>
Wed, 26 Mar 2014 14:48:55 +0100
changeset 3213 53857e1b18a4
parent 3212 5c1eba42b00f
child 3214 ea8288395d80
class: SharedCollection added: #shallowCopy
SharedCollection.st
--- a/SharedCollection.st	Wed Mar 26 11:16:10 2014 +0100
+++ b/SharedCollection.st	Wed Mar 26 14:48:55 2014 +0100
@@ -89,7 +89,13 @@
 shallowCopy
     "analog to species - copy the real collection"
 
-    ^ realCollection shallowCopy
+    |rslt|
+
+    accessLock critical:[
+        "get a consistent copy"
+        rslt := realCollection shallowCopy
+    ].
+    ^ rslt.
 ! !
 
 !SharedCollection methodsFor:'initialization'!
@@ -239,10 +245,10 @@
 !SharedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.12 2014-03-26 10:16:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.13 2014-03-26 13:48:55 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.12 2014-03-26 10:16:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.13 2014-03-26 13:48:55 stefan Exp $'
 ! !