[squeak-dev] The Trunk: Collections-ul.389.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Oct 16 23:01:03 UTC 2010


Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.389.mcz

==================== Summary ====================

Name: Collections-ul.389
Author: ul
Time: 15 October 2010, 8:48:17.954 am
UUID: 406e4bb6-951e-1543-80b3-2f0a524cf6bc
Ancestors: Collections-ul.388

- don't wake up all waiting processes when an item is added to SharedQueue2
- avoid double negation and an extra block creation by using #waitWhile: instead of #waitUntil:
- fixed SharedQueue2 >> #removeAll (items is not a stream)

=============== Diff against Collections-ul.388 ===============

Item was changed:
  ----- Method: SharedQueue2>>next (in category 'accessing') -----
  next
+ 
  	^monitor critical: [
+ 		monitor waitWhile: [ items isEmpty ].
- 		monitor waitUntil: [ items isEmpty not ].
  		items removeFirst ]
  !

Item was changed:
  ----- Method: SharedQueue2>>nextPut: (in category 'accessing') -----
  nextPut: item
+ 
  	monitor critical: [
  		items addLast: item.
+ 		monitor signal.  ].
- 		monitor signalAll.  ].
  	^item!

Item was changed:
  ----- Method: SharedQueue2>>removeAll (in category 'accessing') -----
  removeAll
  	monitor critical: [
+ 		items removeAll ].!
- 		items next: (items size) ].!




More information about the Squeak-dev mailing list