+ // FLOCK (INTERPROCESS) LOCKS
+ //
+ // NOTE THAT THESE LOCKS ARE flock() LOCKS. That is, they may only be used
+ // for inter-process synchronization -- an attempt to acquire a second lock
+ // on the same file descriptor from the same process may succeed. Attempting
+ // to acquire a second lock on a different file descriptor for the same file
+ // should fail, but some systems might implement flock() using fcntl() locks,
+ // in which case it will succeed.
+ void lock();
+ bool try_lock();
+ void unlock();
+
+ void lock_shared();
+ bool try_lock_shared();
+ void unlock_shared();
+