On 2 May 2013 15:33, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On May 2, 2013, at 2:50 PM, Igor Stasenko wrote:
On 2 May 2013 09:54, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
What? I am 99.99% sure it used to interrupt the GUI process if no other viable candidate could be found, why change that? At least in my mind, if you hit cmd - dot, either you want to interrupt some process blocking the UI on a higher priority, or you want the UI process itself. For everything else, there's the Process Browser.
It was never like that. It was always looking for a process which is scheduled, but not interrupt process itself. usually that meant it interrupts things like finalization process, so i added logic to avoid interrupting it unless there's nothing else to interrupt.
From 1.4: handleUserInterrupt [|toInterrupt| toInterrupt := Processor preemptedProcess. "Only interrupt processes which are potentially blocking the UI" toInterrupt priority < UIManager default uiProcess priority ifTrue: [toInterrupt := Project uiProcess].
So yes, it was like that. (barring the other flaws you mentioned, about potentially interrupting critical high-priority processes)
Okay, then we need to change #ifNil clause in following method to just interrupt UI process, instead of showing useless "not interruptable" message: handleUserInterrupt "This will be called from the event-fetcher process. Assume no system-vital processes have a lower priority than this, and are thus ok to interrupt" UserInterruptHandler cmdDotEnabled ifFalse: [ ^ self ]. [ self processToInterrupt ifNotNil: [ :proc | proc debugWithTitle: 'User Interrupt' ] ifNil: [ UIManager default inform: 'Process not interruptable' ] "fork exceptions, we don't want interrupt handler to die" ] on: Error fork: [:ex | ex pass].
Cheers, Henry
-- Best regards, Igor Stasenko.