Using futurist to solve python3 issues

Change-Id: Ibc0beee562905ba93660116799b3f0eb5b7e7b8a
This commit is contained in:
jiaopengju 2019-09-05 23:04:15 +08:00 committed by Jiao Pengju
parent 983ef8561d
commit 93c24b6f31
3 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from collections import defaultdict from collections import defaultdict
from concurrent import futures import futurist
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from threading import RLock from threading import RLock
@ -39,7 +39,7 @@ class ThreadPoolExecutor(base_executor.ScheduledOperationExecutor):
if thread_count is None: if thread_count is None:
thread_count = CONF.thread_count thread_count = CONF.thread_count
self._pool = futures.ThreadPoolExecutor(thread_count) self._pool = futurist.GreenThreadPoolExecutor(thread_count)
self._operation_to_run = defaultdict(int) self._operation_to_run = defaultdict(int)
self._operation_to_cancel = set() self._operation_to_cancel = set()
self._lock = RLock() self._lock = RLock()

View File

@ -29,7 +29,7 @@ extras==1.0.0
fasteners==0.14.1 fasteners==0.14.1
fixtures==3.0.0 fixtures==3.0.0
flake8==2.5.5 flake8==2.5.5
futurist==1.6.0 futurist==1.8.0
google-auth==1.4.1 google-auth==1.4.1
greenlet==0.4.10 greenlet==0.4.10
hacking==0.12.0 hacking==0.12.0

View File

@ -46,3 +46,4 @@ oslo.i18n>=3.15.3 # Apache-2.0
python-swiftclient>=3.2.0 # Apache-2.0 python-swiftclient>=3.2.0 # Apache-2.0
python-karborclient>=0.6.0 # Apache-2.0 python-karborclient>=0.6.0 # Apache-2.0
abclient>=0.2.3 # Apache-2.0 abclient>=0.2.3 # Apache-2.0
futurist>=1.8.0 # Apache-2.0