On 04/03/2011 05:43 PM, Holger Hans Peter Freyther wrote:
> On 04/03/2011 04:58 PM, Holger Hans Peter Freyther wrote:
>
>>
>> Hi,
>> maybe you could help me to understand the Process/BlockClosure/Exception
>> interaction. I do have two issues. The first is that even if I manage to call
>> the timeout block I am still returning to the Delay and do not leave the
>> block. Any idea how I could leave the delay, execute all ensure blocks inside
>> the timeout?
>>
>> Eval [
>> [(Delay forSeconds: 100000) wait] timeout: 1 do: ['Timedout' printNl].
>> ]
>
Hi again,
so Process>>#queueInterrupt: will leave the process suspended if it was
suspended during the interrupt. In my case I end with semaphore wait and no
other link is in the list. What will be the sequence of adding my own
queueInterrupt which will resume the process at the end? E.g. what happens if
we are on a socket?
[semaphore isNil
ifTrue: [[self evaluate: aBlock
ifNotTerminated: [self suspend]]]
ifFalse: [[self evaluate: aBlock
ifNotTerminated: [semaphore wait]]]].
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk