<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Florin,<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">    here's my comment in the implementation from 2010:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"Personally I would like to check MyList, which should not be one of the elements of the scheduler lists.</div><div class="gmail_default"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> But there are awful race conditions in things like should:notTakeMoreThan: that mean we can't.</div><div class="gmail_default"><span class="gmail-Apple-tab-span" style="white-space:pre">    </span> eem 9/27/2010 23:08. e.g.</div><div><br></div><div>So it appears that there may be issues that make it difficult to change the primitive.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 19, 2021 at 4:05 PM Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com">florin.mateoc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div>Hi all,</div><div><br></div><div>In the method Process>>resume, which invokes primitive 87, the comment states that the primitive should fail if the process is already waiting in a queue.</div><div>But the implementation does not do that. If we execute (inspect) the snippet:</div><div><br></div><div> | evaluationProcess result delay testProcess |<br>        delay := Delay forMilliseconds: 50.<br>   testProcess := Processor activeProcess.<br>       evaluationProcess := [<br>  delay unschedule.<br>  result := testProcess isBlocked.<br>  testProcess resume] fork.<br>       delay wait.<br>   result</div><div><br></div><div>it returns true (and no primitive failed error occurs), which means we successfully resumed a blocked (waiting on a semaphore) process.</div><div>I also checked in VMMaker and indeed, the code does not check if the process is on a queue or not before just putting it on a runnable list.</div><div><br></div><div>What do you think? Should the comment be changed or the implementation?</div><div><br></div><div>Florin<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>