You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.
Currently, only ::Ref() commits the write. I believe this is different than other io.Writer impls in the Go stdlib. For example File will flush the write on Close (I think).
If this indeed a guarantee in other io.Writer impls, then it should be for us too. And then I guess we'd want an Abandon() method to actually abandon halfway through a write.
The text was updated successfully, but these errors were encountered:
As far as I can tell, the Closer interface doesn't guarantee that Close() flushes data. The File implementation looks to me like it just calls the underlying POSIX close() syscall, which ALSO makes no guarantees about data being flushed.
That said, I think that for our API usage, it makes sense to provide this guarantee, so I'm gonna look into doing it. We may add Abandon() as well if it makes sense, but skip it for now.
In both FileStore and S3Store, the behavior of calling Ref() twice, or of
calling Ref() after Close() was undefined and probably crashy. After this,
the semantics are as follows:
Once either Ref() or Close() is called, you can't Write() any more.
Ref() can be called any number of times
Close() can be called any number of times
Ref() and Close() can be called in any order.
Addresses issue #6
Currently, only ::Ref() commits the write. I believe this is different than other io.Writer impls in the Go stdlib. For example File will flush the write on Close (I think).
If this indeed a guarantee in other io.Writer impls, then it should be for us too. And then I guess we'd want an Abandon() method to actually abandon halfway through a write.
The text was updated successfully, but these errors were encountered: