summaryrefslogtreecommitdiff
path: root/lib/dir_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dir_lock.h')
-rw-r--r--lib/dir_lock.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dir_lock.h b/lib/dir_lock.h
index 3e9f2a79..925d99d6 100644
--- a/lib/dir_lock.h
+++ b/lib/dir_lock.h
@@ -9,6 +9,9 @@
#include <memory>
#include <zen/file_error.h>
+namespace zen
+{
+const size_t GUI_CALLBACK_INTERVAL = 100;
struct DirLockCallback //while waiting for the lock
{
@@ -20,12 +23,12 @@ struct DirLockCallback //while waiting for the lock
/*
RAII structure to place a directory lock against other FFS processes:
- recursive locking supported, even with alternate lockfile names, e.g. via symlinks, network mounts etc.
- - ownership shared between all object instances refering to a specific lock location(= UUID)
+ - ownership shared between all object instances refering to a specific lock location(= GUID)
- can be copied safely and efficiently! (ref-counting)
- detects and resolves abandoned locks (instantly if lock is associated with local pc, else after 30 seconds)
- temporary locks created during abandoned lock resolution keep "lockfilename"'s extension
- race-free (Windows, almost on Linux(NFS))
- - currently NOT thread-safe! (static LockAdmin)
+ - NOT thread-safe! (1. static LockAdmin 2. directory name aliases must be resolved sequentially!)
*/
class DirLock
{
@@ -37,5 +40,6 @@ private:
class SharedDirLock;
std::shared_ptr<SharedDirLock> sharedLock;
};
+}
#endif // DIR_LOCK_H_INCLUDED
bgstack15