Hi Ron,

On Thu, Mar 28, 2024 at 2:47 PM Ron Teitelbaum <ron@3dicc.com> wrote:
 

On Thu, Mar 28, 2024 at 2:56 PM Eliot Miranda via Vm-dev <vm-dev@lists.squeakfoundation.org> wrote:
 

I agree with Vanessa. We either need a primitive to set a process’s priority rather than relying on assigning to its priority inst var. or we need a primitive which is invoked after a priority change. I’m not sure what the most convenient thing is, but my hunch is that the latter is more useful, but somewhat more difficult to explain ;-)


Couldn't you just modify Process >> priority: to invoke the primitive whenever a priority is set?  Then no explanation is necessary.  Just a comment to explain that it is used  to manage priority changes.  If the process is not running the primitive does nothing.  

That sounds nice and simple. I'll go with that.  The primitive can check for a runnable process simply:
- the active process has no myList
- a quiescent process (runnable but not the running one) has as its myList the list in the quiescentProcesseLists array indexed by its priority.
So if neither of these is true the primitive can fail, and the fall-through code can set the inst var.

Ron


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/677/2025901904@github.com>


_,,,^..^,,,_
best, Eliot