filelock

August 15, 2021 ยท View on GitHub

CI

filelock

FileSystem level exclusive locks.

Usage

import filelock

fn main() {
	println('Hello lock!')
	mut l := filelock.new('test.lock')
	l.acquire() or { panic(err) }
	// do stuff
	l.release()
}

TODO

  • Merge into the main vlib

Inspiration

  • https://github.com/juju/fslock
  • https://www.npmjs.com/package/lockfile
  • https://linux.die.net/man/2/flock

Contents

  1. 1Usage
  2. 2TODO
  3. 3Inspiration