top

On-disk mutex protecting a resource

A lock is represented on disk by a directory of a particular name, containing an information file. Taking a lock is done by renaming a temporary directory into place. We use temporary directories because for all filesystems we believe that exactly one attempt to claim the lock will succeed and the others will fail.

Imports 2 package(s)

  1. github.com/juju/utils
  2. github.com/juju/loggo

Test imports 4 package(s)

  1. github.com/juju/utils/fslock
  2. github.com/juju/testing
  3. launchpad.net/gocheck
  4. launchpad.net/tomb