[squeak-dev] [Pharo-dev] Can we have subclasses of Process?
Eliot Miranda
eliot.miranda at gmail.com
Thu Aug 17 19:28:07 UTC 2017
Hi Denis,
as others have pointed out one can subclass Process. One can also add
instance variables to Process. The constraint is that the first four (*)
instance variables must be left unaltered. The VM makes use of the first
four:
Object subclass: #Link
instanceVariableNames: 'nextLink'
Link subclass: #Process
instanceVariableNames: 'suspendedContext priority myList...
(*five when we have the multithreaded FFI, the fifth being threadId used to
bind processes to specific OS threads when required)
The same goes for ProcessorScheduler - the VM uses quiescentProcessLists &
activeProcess, and Semaphore - the VM uses firstLink lastLink &
excessSignals.
On Thu, Aug 17, 2017 at 5:03 AM, Denis Kudriashov <dionisiydk at gmail.com>
wrote:
> Hi.
>
> Is it allowed to subclass Process? I remember that there were some
> problems with it but I could not find any information.
>
> Generally I think about system processes which can be represented by
> concrete subclasses. For example explicit UIProcess can be used to remove
> many #isUIProcess conditions from system.
>
> Best regards,
> Denis
>
--
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170817/7de7db67/attachment.html>
More information about the Squeak-dev
mailing list
|