# Virtual threads changed the calculus for blocking I/O and not for CPU work

DevFeed: [Virtual threads changed the calculus for blocking I/O and not for CPU work](<https://devfeed.tech/articles/virtual-threads-changed-the-calculus-for-blocking-i-o-and-not-for-cpu-work-87574.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/66-virtual-threads-blocking-io-not-cpu/>)

Author: hello@ankit-rana.com

Published: 2026-10-15T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [backpressure](<https://devfeed.tech/tags/backpressure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [database](<https://devfeed.tech/tags/database.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [loom](<https://devfeed.tech/tags/loom.md>), [performance](<https://devfeed.tech/tags/performance.md>), [virtual-threads](<https://devfeed.tech/tags/virtual-threads.md>)

## AI overview

The article explains how Java virtual threads improve concurrency for services that spend much of their time waiting on blocking I/O, while providing no benefit for CPU-bound work. It discusses carrier pinning, avoiding virtual-thread pools, and placing concurrency limits at constrained downstream resources.

## Source excerpt

A virtual thread that blocks on I/O unmounts from its carrier and costs nothing while it waits, which makes thread-per-request viable at concurrency levels that would have needed reactive code. It does nothing for CPU bound work, because computation still needs a real core and the carrier pool is sized to the core count. Pooling virtual threads is an anti-pattern since they are cheap to create, and blocking inside a synchronized block pins the carrier, which can deadlock a workload that would have been fine on platform threads.