Proposal: Stop enforcing single-writer-multi-reader file access

malcolm.wallace malcolm.wallace at me.com
Tue Nov 8 13:29:14 CET 2011


> * do you think it important to remove all locking?
 
There are certainly cases where automatic locking would remain useful.
> * would you be satisfied (or put up with) having to
> explicitly opt-out of locking when opening a file?
 
Yes.
> * do you see any value at all in locking by default to
> catch bugs where files are read and written concurrently
> by accident?
 
Yes. 

The use case whose current behaviour surprised me, was when I wanted a single writer and multiple readers.  I did think that was what the standard allowed, but I was mistaken and it turns out that you get single writer *or* multiple readers.

The case for multiple simultaneous writers is harder to make, but it should be possible.  I agree that having the unsafe behaviour be the default is probably unwise.

Regards,
    Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20111108/072af6bc/attachment.htm>


More information about the Libraries mailing list