[squeak-dev] The Inbox: Morphic-mt.2016.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jul 3 09:20:39 UTC 2022


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-mt.2016.mcz

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

Name: Morphic-mt.2016
Author: mt
Time: 3 July 2022, 11:20:34.969627 am
UUID: 6b15b539-8b6e-214a-9282-775362faa885
Ancestors: Morphic-kfr.2015

First take on resolving that "UI process is waiting on a strange semaphore" issue.

I am not sure that such a programming model actually exist in Morphic applications. And CMD+Dot rescues the status quo anyway... maybe trying to fix it will make it worse.

See http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-July/221406.html

=============== Diff against Morphic-kfr.2015 ===============

Item was changed:
  ----- Method: MorphicProject>>spawnNewProcessIfThisIsUI: (in category 'active process') -----
  spawnNewProcessIfThisIsUI: suspendedProcess
  	"Initialize a UI process if needed. Answer true if suspendedProcess was interrupted
  	from a UI process."
  	self uiProcess == suspendedProcess ifTrue: [
  		self spawnNewProcess.
  		^true
  	].
  
  	"Ensure that the UI process is running."
  	self uiProcess
  		ifNil: [self spawnNewProcess]
+ 		ifNotNil: [:uip |
+ 			uip isSuspended ifTrue: [
+ 				self restoreDisplay.
+ 				self uiProcess resume].
+ 			uip isBlocked ifTrue: [
+ 				"UI cannot respond because it is waiting on a semaphore. To keep
+ 				the system responsive, suspend the current UI process and start
+ 				a new one. Prohibit #resume from debugger since we cannot
+ 				mark that process as UI process from here."
+ 				self flag: #discuss. "mt: How can we now that that #isBlocked state
+ 				will not resolve itself soon? Can we? Hmm... see WorldState >> #interCyclePause:"
+ 				uip suspend.
+ 				uip shouldResumeFromDebugger: false.
+ 				self spawnNewProcess.
+ 				self addDeferredUIMessage: [uip debug]]].
- 		ifNotNil: [:p | p isSuspended ifTrue: [
- 			self restoreDisplay.
- 			self uiProcess resume]].
  
  	^false		"no new process was created"
  !



More information about the Squeak-dev mailing list