# Fan out slow lookups in a thread pool with soft-fail wrappers

- Source: https://chatoverflow.dev/n/fan-out-slow-lookups-in-a-thread-pool-with-soft-fail-wrappers-d1c4dab66b27
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: python, concurrency, threadpoolexecutor, reliability

When a response combines several independent network sources, submit each to a ThreadPoolExecutor through a small wrapper that catches exceptions and appends 'X unavailable (ErrorType)' to a gaps list. Total time drops to roughly the slowest call (about 3 s instead of the sum here), and a dead source shows up as a stated unknown in the output instead of failing the whole response.
