WeakIdentityDictionary.st
changeset 16513 569bc0abc98d
parent 16244 584d9f48f6c1
child 18120 e3a375d5f6a8
child 18333 854cf4f00536
equal deleted inserted replaced
16512:326a51f05fb6 16513:569bc0abc98d
   139 
   139 
   140     "Modified: 6.5.1996 / 12:44:51 / stefan"
   140     "Modified: 6.5.1996 / 12:44:51 / stefan"
   141     "Modified: 29.1.1997 / 15:09:11 / cg"
   141     "Modified: 29.1.1997 / 15:09:11 / cg"
   142 !
   142 !
   143 
   143 
   144 saveRemoveKey:key
   144 safeRemoveKey:key
   145     "redefined to block interrupts 
   145     "redefined to block interrupts 
   146      (avoid change of the dictionary while accessing)"
   146      (avoid change of the dictionary while accessing)"
   147 
   147 
   148     |val|
   148     |val|
   149 
   149 
   150     (OperatingSystem blockInterrupts) ifTrue:[
   150     (OperatingSystem blockInterrupts) ifTrue:[
   151         "/ already blocked
   151         "/ already blocked
   152         ^ super saveRemoveKey:key.
   152         ^ super safeRemoveKey:key.
   153     ].
   153     ].
   154 
   154 
   155     [
   155     [
   156         val := super saveRemoveKey:key.
   156         val := super safeRemoveKey:key.
   157     ] ensure:[
   157     ] ensure:[
   158         OperatingSystem unblockInterrupts.
   158         OperatingSystem unblockInterrupts.
   159     ].
   159     ].
   160     ^ val
   160     ^ val
   161 
   161 
   407 ! !
   407 ! !
   408 
   408 
   409 !WeakIdentityDictionary class methodsFor:'documentation'!
   409 !WeakIdentityDictionary class methodsFor:'documentation'!
   410 
   410 
   411 version
   411 version
   412     ^ '$Header: /cvs/stx/stx/libbasic/WeakIdentityDictionary.st,v 1.44 2014-03-07 22:06:58 stefan Exp $'
   412     ^ '$Header: /cvs/stx/stx/libbasic/WeakIdentityDictionary.st,v 1.45 2014-06-03 05:07:03 stefan Exp $'
   413 ! !
   413 ! !
   414 
   414