about summary refs log tree commit diff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
authorAmineChikhaoui <amine.chikhaoui91@gmail.com>2018-05-07T14·07+0100
committerAmineChikhaoui <amine.chikhaoui91@gmail.com>2018-05-07T14·07+0100
commit854c0860f4ec68e81869473cf0708529afd0486e (patch)
tree05ae34ebf000aed77187de841d3bf201146bedba /src/libstore/s3-binary-cache-store.cc
parent591e75cd01f1650aab5538432a8637683ad1a9d0 (diff)
share the executor between multiple copy threads.
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index 37da44da873c..96673a5b0cc4 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -281,8 +281,8 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
 
         auto maxThreads = std::thread::hardware_concurrency();
 
-        auto executor =
-            std::make_shared<Aws::Utils::Threading::PooledThreadExecutor>(maxThreads);
+        static std::shared_ptr<Aws::Utils::Threading::PooledThreadExecutor>
+            executor = std::make_shared<Aws::Utils::Threading::PooledThreadExecutor>(maxThreads);
 
         TransferManagerConfiguration transferConfig(executor.get());