help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Timeouts for BlockClosures


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] Timeouts for BlockClosures
Date: Wed, 06 Apr 2011 11:16:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9

On 04/06/2011 11:06 AM, Paolo Bonzini wrote:
> On 04/06/2011 10:56 AM, Holger Hans Peter Freyther wrote:
>> The number is treated as a second already. The result will make sure that the
>> internal blocks has been executed, on a slow system the 1s might be too low.
> 
> No, I thought it was milliseconds.
> 
> I think I made up my mind on the Delay :)
> 
> Let's make this method Delay>>#value:onTimeoutDo:.

(Delay forSeconds: 3)
        value: [the block to execute]
        onTimeoutDo: [the block to handle on timeout?]


vs.

[
  the block to execute.
] timeout: (Delay forSeconds: 3) do: [the block to handle]


I still like the BlockClosure extension more as for me it looks like the main
thing that is happening is the block and the timeout case is just secondary.

Are you settled on Delay>>#value:onTimeoutDo:?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]