From 9d5760d89950d6aab19f108638d51a77cfce72f3 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sun, 1 Mar 2020 14:40:50 -0500 Subject: [PATCH] fix test --- lbry/wallet/server/mempool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/wallet/server/mempool.py b/lbry/wallet/server/mempool.py index 4e7995aac..8816d2ad3 100644 --- a/lbry/wallet/server/mempool.py +++ b/lbry/wallet/server/mempool.py @@ -6,7 +6,7 @@ # and warranty status of this software. """Mempool handling.""" - +import os import asyncio import itertools import time @@ -106,7 +106,7 @@ class MemPool: # Prevents mempool refreshes during fee histogram calculation self.lock = asyncio.Lock() self.wakeup = asyncio.Event() - self.executor = ThreadPoolExecutor(4) + self.executor = ThreadPoolExecutor(max(os.cpu_count() - 1, 1)) async def _logging(self, synchronized_event): """Print regular logs of mempool stats."""