[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Delay in a Process and sending #terminate
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] Delay in a Process and sending #terminate |
Date: |
Sat, 18 Dec 2010 12:31:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.7 |
On 12/18/2010 11:59 AM, Holger Hans Peter Freyther wrote:
> On 12/18/2010 11:38 AM, Holger Hans Peter Freyther wrote:
>> Hi all,
>
>>
>> To work around such sticky processes I have decided to use a [proc
>> isTerminated] whileFalse: [proc terminate] construct.
>>
and one more related question. Is there something about Semaphores and
terminated processes? I have no good test case yet but I think.
A:
[
[ ] ensure: [
mutex critical: ['Sometimes never entered' printNl.
allProcesses remove:
Processor activeProcess].
]
] fork
B:
mutex criticial: [allProcesses do: [:each | each terminate ]].
I think sometimes this statement will not executed when the process is being
terminated. What I am trying to do is to have a cleanup handler for processes.
E.g. to make a process remove itself from a list of processes.
Is there a better way to achieve this goal?