[squeak-dev] Transcript error when forceUpdate: false (?)

Marcel Taeumel marcel.taeumel at hpi.de
Tue Jan 26 12:59:58 UTC 2021


Hi Jaromir,

please take a look at Collections-mt.923 (inbox). Maybe those changes would satisfy all your current needs in this regard. :-)


@all: Would Transcript now be thread-safe? Did I miss something?

Best,

Marcel
Am 25.01.2021 21:38:36 schrieb jaromir <m at jaromir.net>:
Well, I tried deferring the whole Transcript endEntry machinery to the UI
doOneCycle (bypassing the changed: #appendEntryLater mechanism) for
#forceUpdate = false only ... and it seems to avoid the problem!

TranscriptStream >> endEntry

deferredEntry ifNil: [ false ]. "this is a new instance variable"
self semaphore critical:[
self class forceUpdate
ifTrue: [self changed: #appendEntry; reset]
ifFalse: [deferredEntry := true].


TranscriptStream >> flushDeferredEntry
"This is run every UI cycle in doOneCycleNowFor:"

deferredEntry ifTrue: [
self class forceUpdate: true.
self endEntry.
deferredEntry := false.
self class forceUpdate: false.
]

doOneCycleNowFor: aWorld

"... the whole body remains unchanged except:"

capturingGesture ifFalse:
[aWorld runStepMethods.
Transcript flushDeferredEntry. "this is printing for #forceUpdate =
false"
self displayWorldSafely: aWorld].


For #forceUpdate = true the endEntry mechanism remains unchanged and failing
as before...



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210126/7b417f8a/attachment.html>


More information about the Squeak-dev mailing list