[squeak-dev] Transcript losing output when #processPreemptionYields = true

jaromir m at jaromir.net
Sun Jan 31 17:28:14 UTC 2021


Transcript may lose some output for #processPreemptionYields = true

Example (semaphore prearmed with 2 signals):

|accessProtect|
Smalltalk vm processPreemptionYields: true.
Transcript cr.
accessProtect := Semaphore new signal signal.
[accessProtect critical: [
		Transcript cr; show: 'Process 1a '.
		10000 factorial.
		Transcript cr; show: 'Process 1b '.
		]] fork.
Processor yield.
[accessProtect critical: [
		Transcript cr; show: 'Process 2a '.
		10000 factorial.
		Transcript cr; show: 'Process 2b '.
		]] forkAt: 41.
Transcript cr; show: 'Process UIa '.
0.3 second wait.
Transcript cr; show: 'Process UIb '.

Output:
"this is ok"
Process 1a 
Process 2a 
Process 2b 
Process 1b 
Process UIa 
Process UIb 

"Here Process 2a output missing!"
Process 1a 
Process 2b   
Process UIa 
Process 1b 
Process UIb 

"Or even this came out"
Process 1a 
Process 2b 
Process 1b
Process UIb 

The problem is probably related to the post: Transcript error when
forceUpdate: false
http://forum.world.st/Transcript-error-when-forceUpdate-false-td5126397.html

Similar workaround (Collections-mt.923 @ inbox) may fix this issue too.
Tested on Squeak6.0alpha-20182-64bit-freshCopy (Collections-dtl.923 @ trunk)








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


More information about the Squeak-dev mailing list