[squeak-dev] The Trunk: Collections-eem.909.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 14 17:40:22 UTC 2020


Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.909.mcz

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

Name: Collections-eem.909
Author: eem
Time: 14 September 2020, 10:40:20.674349 am
UUID: de499e36-5394-4102-86f7-aa1def93b595
Ancestors: Collections-mt.908

Make TranscriptStream's access protect an inst var and a Mutex.

=============== Diff against Collections-mt.908 ===============

Item was changed:
  WriteStream subclass: #TranscriptStream
+ 	instanceVariableNames: 'lastChar lock'
+ 	classVariableNames: 'CharacterLimit ForceUpdate RedirectToStdOut'
- 	instanceVariableNames: 'lastChar'
- 	classVariableNames: 'AccessSema CharacterLimit ForceUpdate RedirectToStdOut'
  	poolDictionaries: ''
  	category: 'Collections-Streams'!
  
  !TranscriptStream commentStamp: 'fbs 12/30/2013 09:53' prior: 0!
  This class is a much simpler implementation of Transcript protocol that supports multiple views and very simple conversion to morphic.  Because it inherits from Stream, it is automatically compatible with code that is designed to write to streams.!

Item was changed:
  ----- Method: TranscriptStream>>endEntry (in category 'stream extensions') -----
  endEntry
  	"Display all the characters since the last endEntry, and reset the stream"
+ 	self lock critical:
+ 		[self changed: (self class forceUpdate
+ 							ifTrue: [#appendEntry]
+ 							ifFalse: [self changed: #appendEntryLater])]!
- 	self semaphore critical:[
- 		self class forceUpdate
- 			ifTrue: [self changed: #appendEntry]
- 			ifFalse: [self changed: #appendEntryLater].
- 		self reset.
- 	].!

Item was added:
+ ----- Method: TranscriptStream>>lock (in category 'private') -----
+ lock
+ 	^lock ifNil:[lock := Mutex new]!

Item was removed:
- ----- Method: TranscriptStream>>semaphore (in category 'private') -----
- semaphore
- 	^AccessSema ifNil:[AccessSema := Semaphore forMutualExclusion]!



More information about the Squeak-dev mailing list