> One stupid question, when will terminated processes be
> removed/destroyed/deleted from the system? I have seen
> Process>>primTerminate (or such) but this does not seem to remove the
> Process?

A suspended process is removed from the process list.  A terminated
process is simply a suspended process with a nil suspendedContext (so
it cannot be resumed).

The processes are destroyed/deleted through normal GC.  Running
processes are never GCed, because they're accessible via Processor
which is one of the VM's roots.  But non-running processes can be
garbage collected even before they've been terminated if:

1) they are suspended

2) they are waiting on a semaphore that is GCed itself.

as long as the process is not reachable otherwise.  In both cases
#ensure: blocks etc. won't be executed, which makes suspending
processes usually a very bad idea unless you want to manage your
memory as you would in C. :-)

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to