<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Levente,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 10, 2021 at 11:54 AM Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</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">On Wed, 10 Feb 2021, Eliot Miranda wrote:<br>
<br>
> <br>
> <br>
> On Wed, Feb 10, 2021 at 11:27 AM Jaromir <<a href="mailto:m@jaromir.net" target="_blank">m@jaromir.net</a>> wrote:<br>
>       > the right solution is to create a new primitive if we want to support<br>
>       on-the-fly priority changes.<br>
><br>
>       The system already does on-the-fly priority changes - implementing<br>
>       #valueUnpreemptively and #valueAt: - but they're actually not working<br>
>       properly due to this #priority: issue - they're trying to use #yield after<br>
>       changing the priority down but that really doesn't do anything.<br>
> <br>
> <br>
> So it seems to me that updating the yield primitive to "do the right thing" is a good way to go.  Agreed?  If so, I should be able to get to that very soon.<br>
<br>
I think it's not. Let's say the priority of process p is 30, I want to <br>
increase it to 40 and then do something at that priority.<br>
#yield will stop the process and put it at the end of the list of <br>
processes with 40 priority (I think the current implementation doesn't <br>
check for priority changes and puts the process on the list of its <br>
earlier priority).<br>
So, with yield, p will have to wait until all other 40 priority processes <br>
finish their job or yield instead of just continuing as the active <br>
process.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">But if that's the behaviour you want you can either</div><div class="gmail_default" style="font-size:small">- set the priority, do the processing, and then invoke yield</div><div class="gmail_default" style="font-size:small">- do the processing and then set the priority and then yield, right?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We're not tying assigning to priority to the yield primitive, right?  These are still distinct operations.  I'm simply suggesting that the yield primitive take into account the receiver's priority, which it currently doesn't do.</div><div class="gmail_default" style="font-size:small"><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">
<br>
<br>
Levente<br>
<br>
> _,,,^..^,,,_<br>
> best, Eliot<br>
> <br>
><br>
</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></div>