[squeak-dev] Process fork/yield

Levente Uzonyi leves at elte.hu
Mon Apr 12 18:27:58 UTC 2010


On Mon, 12 Apr 2010, Ang BeePeng wrote:

>
> Hi,
>
> The following method will not reach forkAt: 30. Is that true?
>
> [[true]
> 		whileTrue: [SqueakDLL processDLLString]] forkAt: 30

No, #forkAt: will be reached. The above code has the following form:
[ <some code here> ] forkAt: 30.
When this is evaluated, a block will be created (copied actually) with 
the infinite loop. The block won't be evaluated until you send #forkAt: to 
it.


Levente

>
>
> If that is the case, will "Processor yield" do the job? Why is it?
>
> [true]
> 		whileTrue: [SqueakDLL processDLLString.
>                                Processor yield.]
>
> Thanks.
>
> Ang Beepeng
> -- 
> View this message in context: http://n4.nabble.com/Process-fork-yield-tp1837475p1837475.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>



More information about the Squeak-dev mailing list