From 4806447284f23f1a14bfe19e044c6ea0ed4ba96e Mon Sep 17 00:00:00 2001 From: hitomi Date: Tue, 2 Jul 2019 15:58:03 +0900 Subject: [PATCH] Set max_workers to ThreadPoolExecutor --- CHANGELOG.md | 1 + qiskit/providers/aer/aerjob.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ee2532db..800d7cc7fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Fixed with no identity component. (\#243) - Fixed 2-qubit depolarizing-only error parameter calculation in basic_device_noise_model (\#243) +- Set maximum workers to ThreadPoolExecutor in AerJob to limit thread creation (\#259) [0.2.1](https://github.com/Qiskit/qiskit-aer/compare/0.2.0...0.2.1) - 2019-05-20 ================================================================================ diff --git a/qiskit/providers/aer/aerjob.py b/qiskit/providers/aer/aerjob.py index 8258132a74..cc43432505 100644 --- a/qiskit/providers/aer/aerjob.py +++ b/qiskit/providers/aer/aerjob.py @@ -50,7 +50,7 @@ class AerJob(BaseJob): _executor (futures.Executor): executor to handle asynchronous jobs """ - _executor = futures.ThreadPoolExecutor() + _executor = futures.ThreadPoolExecutor(max_workers=1) def __init__(self, backend, job_id, fn, qobj, *args): super().__init__(backend, job_id)