comment
This commit is contained in:
parent
1e016611de
commit
1a051f4300
1 changed files with 8 additions and 1 deletions
|
@ -54,7 +54,14 @@ Content
|
||||||
KeyCacheIndex key cache
|
KeyCacheIndex key cache
|
||||||
|]
|
|]
|
||||||
|
|
||||||
{- Opens the database, creating it if it doesn't exist yet. -}
|
{- Opens the database, creating it if it doesn't exist yet.
|
||||||
|
-
|
||||||
|
- Multiple readers and writers can have the database open at the same
|
||||||
|
- time. Database.Handle deals with the concurrency issues.
|
||||||
|
- The lock is held while opening the database, so that when
|
||||||
|
- the database doesn't exist yet, one caller wins the lock and
|
||||||
|
- can create it undisturbed.
|
||||||
|
-}
|
||||||
openDb :: Annex DbHandle
|
openDb :: Annex DbHandle
|
||||||
openDb = withExclusiveLock gitAnnexKeysDbLock $ do
|
openDb = withExclusiveLock gitAnnexKeysDbLock $ do
|
||||||
dbdir <- fromRepo gitAnnexKeysDb
|
dbdir <- fromRepo gitAnnexKeysDb
|
||||||
|
|
Loading…
Add table
Reference in a new issue