From 854c0860f4ec68e81869473cf0708529afd0486e Mon Sep 17 00:00:00 2001 From: AmineChikhaoui Date: Mon, 7 May 2018 15:07:00 +0100 Subject: share the executor between multiple copy threads. --- src/libstore/s3-binary-cache-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/s3-binary-cache-store.cc') 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(maxThreads); + static std::shared_ptr + executor = std::make_shared(maxThreads); TransferManagerConfiguration transferConfig(executor.get()); -- cgit 1.4.1