[squeak-dev] The Inbox: Kernel-jar.1368.mcz

Jaromir Matas m at jaromir.net
Fri Mar 5 10:31:15 UTC 2021


In
http://forum.world.st/valueNoContextSwitch-no-different-from-value-td5127491.html
I tested #valueNoContextSwitch and accidentally verified again how badly
broken #valueUnpreemptively is due to the #priority bug. I also tried to
apply the workaround I suggested in this post ([] forkAt: Processor
highestPriority) and it's desperately slow so I can only agree a new
primitive is probably the only good solution.

I dont't think we necessarily need a whole #priority as a primitive though.
A primitive where the scheduler gives an active process a kick to *preempt*
when downgrading its priority should suffice:

Process>>priority: anInteger
	self isActiveProcess ifTrue: [primitivePriority: anInteger]
	...

(so it's not the same as yielding; it's like preempting: take
#valueUnpreemptively as an example - a process raises its priority and later
goes back where it was - I guess the desired behavior is the process
continues running after the downgrade (and no more higher prio processes
present) even if there are processes waiting at the lower priority; they may
have there even before the process raised its priority, so why send it to
the back :) .

I guess this Kernel-jar.1368.mcz can be removed from The Inbox.

regards,



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


More information about the Squeak-dev mailing list