Hi,
I've just come across this strange behavior:
Try to execute this (Cmd + . will recover the image):
p := [] newProcess resume. "p placed in run queue"
p suspendedContext: nil. "image freezes"
This can easily happen when a process gets preempted between the assignment and the next send. The scheduler apparently tries to run the waiting runnable process which has changed its suspendedContext while waiting in the run queue. I sort of expected the scheduler to disqualify such process but it looks like that's not happening.
Changing the suspendedContext while waiting is ok, I guess, as long as the new suspendedContext is a context and most of all is not nil.
I suggest a workaround in Kernel-jar.1474:
suspendedContext: aContext
suspendedContext := aContext ifNil: [self suspend. nil]
Is this ok?
Thanks,
Jaromir
--
Jaromír Matas
mail(a)jaromir.net