[squeak-dev] The Inbox: Compiler-mt.456.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Feb 2 13:56:09 UTC 2021


> Now I'm confused - it looks to me either yield primitive 167 or #valueUnpreemptively behave incorrectly

Hmm... I think that "Processor yield" should not only schedule the next runnable process at the same priority but also serve as a "classic" suspension point and consider higher-priority processes first.

Not sure whether this is "by design" or actually a bug... most of the time, you would not need "Processor yield" to also look for interrupts. There are typically enough other suspension points. Hmmmm...

Best,
Marcel
Am 02.02.2021 14:49:41 schrieb jaromir <m at jaromir.net>:
> > Try to remove the primitive from #yield and then it works ok
>
> Yes, removing the primitive form #yield will introduce one (or more)
> suspension points because of the (rather complex) fallback implementation.
> Yet, I cannot do that in a test. :-)

Now I'm confused - it looks to me either yield primitive 167 or
#valueUnpreemptively behave incorrectly because your example

x := 0.
[ [ x := 1 ] forkAt: 41 ] valueUnpreemptively.
y := x == 1.

should definitely return true. In case yield primitive works as intended,
#valueUnpreemptively should change (replace Processor yield line to digest
the change of priority) or vice versa - or am I missing something?

J.



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210202/edfaa9ea/attachment.html>


More information about the Squeak-dev mailing list