2009/3/29 Stéphane Ducasse <[email protected]>:
> Hi all
>
> I'm working on a threadSafeTranscript and I could not understand why
> the following code
> does not print something else than
>
>        1*100-102-103-104-105-106-107-108-109-110-
>
> |tt|
> tt := Transcript.
> [1 to: 10 do: [:i | tt show: i printString; show: '*'.
>                                        Processor yield ].
>        tt flush        ]  fork.
> [100 to: 110 do: [:i | tt show: i printString; show: '-'.
>                                        Processor yield  ].
>        tt flush        ] fork.
>

What you expecting from it?
If you imagine that Processes running in parallel, then numbers can be
in any order , as well as * and - characters.
Or you mean, that it eating 2-10 numbers which should be printed?
In this case, the source of inconsistency could be the #flush method.
But its hard to say, without looking at source code.

> Stef
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to