<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal">I've just come across this strange behavior:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Try to execute this (Cmd + . will recover the image):</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">p := [] newProcess resume. "p placed in run queue"</p>
<p class="MsoNormal">p suspendedContext: nil.  "image freezes"</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I suggest a workaround in Kernel-jar.1474:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">suspendedContext: aContext</p>
<p class="MsoNormal">                suspendedContext := aContext ifNil: [self suspend. nil]</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is this ok?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Jaromir</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNoSpacing"><span lang="CS">--</span></p>
<p class="MsoNoSpacing"><strong><span style="font-family:"Calibri Light",sans-serif;color:#333333;font-weight:normal">Jaromír Matas</span></strong><span style="font-family:"Calibri Light",sans-serif;color:#555555"><o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-family:"Calibri Light",sans-serif;color:#2E75B6">mail@jaromir.net</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>