There is also #repeat for 'infinite' loops

> On 1 Jun 2018, at 10:18, Ben Coman <[email protected]> wrote:
> 
> 
> 
> On 1 June 2018 at 15:23, Ben Coman <[email protected]> wrote:
> 
> 
> On 1 June 2018 at 14:59, Ben Coman <[email protected]> wrote:
> I'm curious about the following behaviour...
> 
> "In Playground, first evaluate..."
> s := Semaphore new.
> [    [      s wait.   
>             Transcript crShow: 'x' 
>              ] whileTrue 
> ] forkAt: 41.
> 
> Apologies for my brain freeze. It should have been...
> s := Semaphore new.
> [     [       s wait.
>               Transcript crShow: 'x'.
>               true ] whileTrue 
> ] forkAt: 41.
> 
> 
> But an error around the end of the block rather than the start would have 
> been useful.
> cheers -ben
>  
> 
> "then later..."
> s signal.
> 
> ==> 'x' is seen in Transcript
> but then an error pops up "#wait was sent to nil"
> 
> So...  's'  *was*  valid and then its not?
> 
> cheers -ben
> 
>  


Reply via email to