Concurrency · interview question
What is the healthiest performance judgment around threads for blocking i/o?
Multiple choiceMediumchapter-15-curatedpremiumconcurrencythreads-for-blocking-i-o
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=8) as pool:
futures = [pool.submit(call_legacy_system, order_id) for order_id in order_ids]Answer and explanation
Correct answer
C. Measure before optimizing, then change the part that actually dominates cost instead of guessing from style alone.
Why
Premature optimization is usually weaker than targeted optimization backed by measurement.
Test yourself on Concurrency
A free test with instant, explained results. No account needed.
More Concurrency questions
- What kind of contract clarity matters most for task coordination?
- What production risk should you worry about most if task coordination is handled lazily?
- A senior interviewer asks for one tradeoff behind semaphores, timeouts, and cancellation. What is the strongest…
- Which explanation would sound strongest in an interview when discussing threads for blocking i/o?
- Another engineer will maintain this code later. What choice helps the most around semaphores, timeouts, and…
- What kind of contract clarity matters most for threads for blocking i/o?