summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-31 23:42:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-01 15:51:11 +0100
commit883813deae842c25d9172aeceb5302fdec1258df (patch)
treebf9d8dcaba67587b734617b12e78232ea2f968a0 /bitbake/lib/prserv
parent3e5abff7da73fe35842c06cd85e2a4f50c4efa05 (diff)
downloadpoky-883813deae842c25d9172aeceb5302fdec1258df.tar.gz
bitbake: serv/db: Take an excluside lock on the database
We only support one server using the database at a time so take an exclusive lock and avoid later lock overhead. (Bitbake rev: e3e39be6f2d063858c92971ce8ccd89c95d4f26d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv')
-rw-r--r--bitbake/lib/prserv/db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py
index b7190bad01..3fb2c3482a 100644
--- a/bitbake/lib/prserv/db.py
+++ b/bitbake/lib/prserv/db.py
@@ -224,7 +224,7 @@ class PRData(object):
224 except OSError as e: 224 except OSError as e:
225 if e.errno != errno.EEXIST: 225 if e.errno != errno.EEXIST:
226 raise e 226 raise e
227 self.connection=sqlite3.connect(self.filename, isolation_level="DEFERRED", check_same_thread = False) 227 self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
228 self.connection.row_factory=sqlite3.Row 228 self.connection.row_factory=sqlite3.Row
229 self._tables={} 229 self._tables={}
230 230