From b7b7ddaeca42a9cde43c99cf6e3f9a937e5490a8 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Sun, 1 May 2016 13:58:28 -0400 Subject: [feature] use deferred semaphore --- client/src/leap/soledad/client/adbapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src/leap') diff --git a/client/src/leap/soledad/client/adbapi.py b/client/src/leap/soledad/client/adbapi.py index 77822247..c2fbb06e 100644 --- a/client/src/leap/soledad/client/adbapi.py +++ b/client/src/leap/soledad/client/adbapi.py @@ -24,9 +24,9 @@ import sys import logging from functools import partial -from threading import BoundedSemaphore from twisted.enterprise import adbapi +from twisted.internet.defer import DeferredSemaphore from twisted.python import log from zope.proxy import ProxyBase, setProxiedObject from pysqlcipher.dbapi2 import OperationalError @@ -204,7 +204,7 @@ class U1DBConnectionPool(adbapi.ConnectionPool): :rtype: twisted.internet.defer.Deferred """ meth = "u1db_%s" % meth - semaphore = BoundedSemaphore(SQLCIPHER_MAX_RETRIES - 1) + semaphore = DeferredSemaphore(SQLCIPHER_MAX_RETRIES - 1) def _run_interaction(): return self.runInteraction( -- cgit v1.2.3