Thread-Safe FileStreams

Bijan Parsia bparsia at email.unc.edu
Mon Apr 6 19:40:26 UTC 1998


At 3:25 PM -0400 4/6/98, Andreas Raab wrote:

[snip]
>
>I've tried it from Squeak - the result is the same. However, "/dev/stdout"
>is not considered to be a "regular" file. If you do the same with a usual
>file handle, only the second write should show the effect.

Sorry, what's the result and what's the effect?

When I run your code on my make, blurb.bla ends up with 'First hello' in
it. (No failures.) Is that what you expected?

> That is at
>least what Squeak is doing if I try
>
>| f1 f2 |
>(FileStream newFileNamed:'blurb.bla') close. "So it's there"
>f1 := FileStream oldFileNamed:'blurb.bla'.
>f2 := FileStream oldFileNamed:'blurb.bla'.
>f1 nextPutAll:'First hello'.
>f1 close.
>f2 nextPutAll:'Second hello'.
>f2 close.
>

Cheers,
Bijan.





More information about the Squeak-dev mailing list