From a8fd6c52c0d631f4ef85d7dda6ea425d4e2f66b2 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 30 Nov 2013 16:15:53 +0100 Subject: [PATCH] [entropy.db.skel] warn about flock related methods usage --- lib/entropy/db/skel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/entropy/db/skel.py b/lib/entropy/db/skel.py index de5f7a742..93ffb95b8 100644 --- a/lib/entropy/db/skel.py +++ b/lib/entropy/db/skel.py @@ -422,6 +422,7 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore): def shared(self): """ Acquire a shared file lock for this repository (context manager). + This is used for inter-process synchronization only. """ self.acquire_shared() try: @@ -433,6 +434,7 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore): def exclusive(self): """ Acquire an exclusive file lock for this repository (context manager). + This is used for inter-process synchronization only. """ self.acquire_exclusive() try: @@ -443,18 +445,21 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore): def acquire_shared(self): """ Acquire a shared file lock for this repository. + This is used for inter-process synchronization only. """ raise NotImplementedError() def acquire_exclusive(self): """ Acquire an exclusive file lock for this repository. + This is used for inter-process synchronization only. """ raise NotImplementedError() def try_acquire_shared(self): """ Try to acquire a shared file lock for this repository. + This is used for inter-process synchronization only. @return: True, if acquired, False otherwise. @rtype: bool