base
base copied to clipboard
Add windows implementation of flock based on golang/internal
Title sums it all. Implemented it because grit fails to build on Windows.
The underlying implementation is decided by the compiler build tags, while being transparent to the user.
The test written for the package passes on my Windows machine:
go test github.com/grailbio/base/flock
ok github.com/grailbio/base/flock
I am, however, concerned about the unix implementation: do we close files after unlocking?