Dynamic ThreadPoolExecutor Parameter Configuration in Java

ThreadPoolExecutor provides seven core parameters that control thread pool behavior: Core Parameters corePoolSize: The number of threads to keep in the pool even when idle, unless allowCoreThreadTimeOut is enabled maximumPoolSize: The maximum number of threads allowed in the pool keepAliveTime: The maximum time excess threads (beyond corePoolS ...

Posted on Tue, 16 Jun 2026 16:56:07 +0000 by thessoro

Analysis of Kafka Message Loss During Deployment Restarts

A colleague from another team reported that during project releases or restarts (using kill -15), C-end business services often experienced issues leading to financial loss. After hearing about potential money loss, I immediately took responsibility, gathered details, and started investigating. Problem Analysis Based on the descriptoin and my k ...

Posted on Mon, 01 Jun 2026 17:46:42 +0000 by rab

A Practical Guide to Python Multithreading

target: specifies the function the thread will execute args: positional arguments passed to the target function (tuple) kwargs: keyword arguments passed to the target function (dictionary) name: gives the thread a name Thread object methods: start() join() run(): the task function is ultimately executed inside the thread's run method import ...

Posted on Sun, 17 May 2026 18:55:12 +0000 by les4017

Python ThreadPoolExecutor for Concurrent Task Execution

Overview ThreadPoolExecutor from the concurrent.futures module provides a simple way to run multiple tasks concurrently in Python. It manages a pool of worker threads and distributes tasks across them efficiently. Three-Step Pattern # Step 1: Import the executor from concurrent.futures import ThreadPoolExecutor # Step 2: Create an executor ins ...

Posted on Thu, 14 May 2026 09:11:54 +0000 by cdherold

ThreadPoolExecutor Configuration and Execution Patterns in Java

The ThreadPoolExecutor accepts seven arguments governing thread lifecycle and task dispatching: new ThreadPoolExecutor( 2, // basePoolSize 10, // ceilingPoolSize 30L, // idleThreshold TimeUnit.SECONDS, new LinkedBlockingQueue<>(100), Executors.defaultThr ...

Posted on Mon, 11 May 2026 10:29:56 +0000 by dougal85