[Vm-dev] primitive 87 resume

Florin Mateoc florin.mateoc at gmail.com
Wed May 19 23:05:08 UTC 2021

Hi all,

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.
But the implementation does not do that. If we execute (inspect) the

| evaluationProcess result delay testProcess |
delay := Delay forMilliseconds: 50.
testProcess := Processor activeProcess.
evaluationProcess := [
  delay unschedule.
  result := testProcess isBlocked.
  testProcess resume] fork.
delay wait.

it returns true (and no primitive failed error occurs), which means we
successfully resumed a blocked (waiting on a semaphore) process.
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.

What do you think? Should the comment be changed or the implementation?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210519/adb3a7ec/attachment.html>

More information about the Vm-dev mailing list