[Q] Process termination / GC
Lex Spoon
lex at cc.gatech.edu
Tue Jul 29 14:22:27 UTC 2003
John M McIntosh <johnmci at smalltalkconsulting.com> wrote:
>
> On Monday, July 28, 2003, at 01:37 PM, Lex Spoon wrote:
>
> > In short, a process will never get GC-ed. You have to terminate it
> > yourself.
>
> Mmm this brought back memorys of an issue I had many years ago with
> VW. A running process is on the processor queues sorted by priority.
> But if you suspended it, why it just removed it from the queue
> structure. Seems a simple thing, but the problem was the only strong
> link to that process and other things it held onto was via the
> processor queue. So when I suspended it, then later went to resume it
> after closing the inspector, why it was gone... Needed a Singleton on
> the class side somewhere to hold onto it, a common pattern in the
> image.
>
> Never looked to see if this is the case in Squeak.
>
Anthony says it is. I wouldn't be surprised--I hadn't considered
suspended processes before making my statement above.
I'm not sure where the link was held for ConnectionQueue's, however. I
guess because the socket's semaphore is held in some array that lets it
be signalled from the VM ? Maybe I was unlucky. The OP's semaphore was
associated with a SharedQueue, which will turn into garbage much more
easily.
Lex
More information about the Squeak-dev
mailing list
|