Thread-Safe FileStreams

Mark Guzdial guzdial at cc.gatech.edu
Mon Apr 6 17:55:28 UTC 1998


At 7:15 PM +0200 4/6/98, Andreas Raab wrote:
>You're doing two bad things at the same time ;-) Not only you access the
>same file from different processes, you even more *share* the variable
>where the file pointer is stored. If you wouldn't do this, you would not
>run out of file handles. If you would use aFile1, aFile2, and aFile3 in
>each process everything would be fine (except from the primitiveFailed
>of course).

You're right, of course.  When I fix the shared file variable as you
describe, I don't lose file handles anymore. <sigh>  It's pretty clear that
we're running out of them in the PWS, but it's been hard to reliably
replicate the error.

But the general question still stands: What's the right level to address
thread-safe file access?

Thanks!
 Mark

--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list