grailbio / base

A collection of Go utility packages used by GRAIL's tools
Apache License 2.0
89 stars 25 forks source link

Add windows implementation of flock based on golang/internal #35

Closed fikisipi closed 8 months ago

fikisipi commented 3 years ago

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?