Documentation ¶
Overview ¶
Package pathlock defines a PathLocker interface and an implementation that will synchronize based on filepath.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locker ¶
Locker is an interface for synchronizing on a given filepath. A call to Lock a given path will block any asynchronous calls to Lock that same path, or any parent or child path in the same sub-tree. For example:
- Lock path /a/b/c
- Blocks a Lock call for the same path /a/b/c
- Blocks a Lock call for path /a/b or /a
- Blocks a Lock call for path /a/b/c/d
- Allows a Lock call for path /a/b/x
- Allows a Lock call for path /a/x
Click to show internal directories.
Click to hide internal directories.