This commit is contained in:
Jack Robison 2020-03-01 14:40:50 -05:00
parent 7945e1ea3c
commit 9d5760d899
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -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."""