logo       

BlockClosure>>fork problem: msg#00092

lang.smalltalk.squeak.beginners

Subject: BlockClosure>>fork problem

Hi all,
I'm new to Smalltalk and Squeak and I have a question.
I tried some examples from chapter Processes from "Smalltalk by Example" book. I executed the following code several times but the output was quite different as I suppose and differed from time to time.
Furthermore evaluation went a bit slowly.

[10 timesRepeat: [Transcript show: '2']] fork.
[10 timesRepeat: [Transcript show: '1']] fork.
Transcript cr.

2222222212121111111
2222222121212111111
22222222221111111111
2212121212121212121
2222222222111111111
2222222222111111111
2222121212121212111
22222222221111111111
22222222221111111111
2212121212121212121
...

In VisualWorks the same example works right. As described in the book.
I use Squeak 3.9 7067.

Is this a bug or i do something wrong?

Thanks,

George

P.S. Execuse me my poor english, please.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise