[squeak-dev] Re: The Trunk: Kernel-mt.1009.mcz
Levente Uzonyi
leves at caesar.elte.hu
Tue Apr 5 17:44:07 UTC 2016
The line
[] forkAt: Processor activePriority + 1
should interrupt the current process without any Semaphores involved.
Except for the case when the process has the highest possible priority,
but yielding from that process, assuming there's only one, wouldn't make
any sense anyway.
Levente
On Tue, 5 Apr 2016, marcel.taeumel wrote:
> Hi Eliot,
>
> with "Smalltalk processPreemptionYields == false", is there a Smalltalk way
> to implement ProcessorScheduler >> #yield?
>
> At the moment, it looks like this:
>
> | semaphore |
> <primitive: 167>
> semaphore := Semaphore new.
> [semaphore signal] fork.
> semaphore wait.
>
> And another question: How to "yield" a process (i.e. put back in line) that
> is not currently running but runnable?
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/The-Trunk-Kernel-mt-1009-mcz-tp4887889p4888435.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
More information about the Squeak-dev
mailing list
|