Suspending/resuming processes
Andreas Raab
andreas.raab at gmx.de
Thu Dec 20 21:27:08 UTC 2007
Igor Stasenko wrote:
> On 20/12/2007, Andreas Raab <andreas.raab at gmx.de> wrote:
>> Your interpretation of "suspended" is different from what Squeak means
>> by it. "Suspended" means: This process cannot be made runnable by either
>> a process switch or a semaphore signal.
>>
> Hmm, how it differs from 'cannot be made runnable until it will be
> resumed by sending #resume message'?
It is equivalent. In your example the process *could* be made runnable
(by the semaphore being signaled) so by this definition it wasn't suspended.
> In the current implementation a #resume is not a counterpart of
> #suspend and we all have to pay consequences.
True. But making them symmetric by changing suspend is not useful. If
you wanted to make them symmetric you'd have to change resume so that it
puts the process back on the list it was suspended frm.
> The #resume should be no-op if process was not suspended by previous
> call of #suspend.
> But currently, by sending #resume to process which waiting for signal
> causing it to continue running as if signal raised.
That is a bug and should be fixed.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|