create_thread_pool_executor
Documentation for eth_defi.event_reader.web3worker.create_thread_pool_executor function.
- create_thread_pool_executor(factory, context=None, max_workers=16)[source]
Create a thread pool executor.
All pool members have the thread locals initialized at start, so that there is Web3 connection available.
- Parameters
factory (eth_defi.event_reader.web3factory.Web3Factory) – The factory that provides web3 connection for each threaad after a thread has been launched.
context (Optional[eth_defi.event_reader.logresult.LogContext]) –
Event reader context.
If you want to pass something extra for the event reader.
max_workers – How many threads are allocated for futureproof pool.
- Return type
futureproof.executors.ThreadPoolExecutor