blocking-and-nonblocking-iolisted
Install: claude install-skill robsonkades/agent-skills
# Blocking and Non-Blocking I/O
## Purpose
Keep four distinct properties distinct, because every confused architecture argument about
virtual threads and reactive programming comes from collapsing them:
```text
Blocking API the method returns when the operation is done
Blocked OS thread a kernel-schedulable entity is parked and unavailable
Non-blocking I/O the syscall returns immediately with whatever is ready
Asynchronous model the code is expressed as callbacks or stages, not statements
```
A virtual thread doing `socket.read()` uses a **blocking API**, does **not** dedicate a
blocked carrier to that request, sits on top of **non-blocking I/O** plus a shared poller in
the current JDK implementation, and is written in a
**synchronous** model. All four at once. Any sentence that treats them as the same axis is
wrong somewhere.
## Compatibility and evidence
Virtual-thread APIs require Java 21 (standard, no preview flags). Implementation guidance
here targets HotSpot JDK 21–25; the monitor behavior changes at JDK 24. Before applying it,
inspect compiler/toolchain settings, the deployed JDK vendor and version, OS, resolved
client/framework versions, transport and scheduler configuration. These can differ from
the development JDK. Recheck implementation claims for other releases; do not upgrade the
project or add instrumentation dependencies merely to apply this skill.
## Workflow
1. **Ask which property the claim is about.** "Is this blocking?" is fo