Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fc20c82a6 |
@@ -23,8 +23,7 @@ var memFsLock sync.Mutex
|
|||||||
// LockStateDir takes the lock that a command changing anything under
|
// LockStateDir takes the lock that a command changing anything under
|
||||||
// stateDir holds until it returns, and returns the function that releases
|
// stateDir holds until it returns, and returns the function that releases
|
||||||
// it. While one command holds it, the next one waits here. Reads take no
|
// it. While one command holds it, the next one waits here. Reads take no
|
||||||
// lock: each file or directory a command changes is replaced in a single
|
// lock: every change becomes visible in a single rename.
|
||||||
// rename, so a reader finds it as it was before or after, never half-made.
|
|
||||||
//
|
//
|
||||||
// On the real filesystem the lock is flock(2) on the file "lock" in
|
// On the real filesystem the lock is flock(2) on the file "lock" in
|
||||||
// stateDir, which the kernel releases when the process dies, so a killed
|
// stateDir, which the kernel releases when the process dies, so a killed
|
||||||
|
|||||||
Reference in New Issue
Block a user