"매 concurrency 매 task 의 interleaving — parallelism 의 simultaneous 와 별개". Hoare CSP, Hewitt Actor 의 lineage. 2026 매 Rust async, Go goroutines, Java virtual threads (Project Loom GA), Python free-threaded mode 매 mainstream.
매 핵심
매 Concurrency vs Parallelism
Concurrency: 매 dealing-with-many things at once (composition).
Parallelism: 매 doing-many things at once (execution).
매 concurrent 코드 매 single-core 매 still concurrent. 매 parallel 매 multi-core required.
매 Primitives
Threads / processes: 매 OS-level. Heavyweight.
Coroutines / fibers / virtual threads: 매 user-mode lightweight.
Async / await: 매 cooperative scheduling.
Channels: 매 message passing (Go, Rust mpsc).
Mutex / RWLock / Semaphore: 매 shared-memory sync.
Atomic: 매 lock-free primitive.
매 응용
Web server: 매 1 connection-per-virtual-thread (Loom) / async (tokio).
Pipeline: 매 channel-based fan-out / fan-in.
Actor system: 매 isolation per actor + supervision (Erlang/Elixir, Akka).
언제: 매 concurrent code review 의 race-condition spotting, 매 deadlock-pattern detection, 매 channel-pattern translation.
언제 X: 매 subtle memory-ordering bug — 매 formal verification (TLA+, loom) 의 사용.
❌ 안티패턴
Shared mutable state without sync: 매 race condition. UB in C++/Rust.
Mutex in hot path: 매 contention 의 serialization. 매 atomic / per-thread state.
Unbounded goroutine spawn: 매 OOM. 매 bounded pool / semaphore.
Sync I/O in async function: 매 single blocked task → 매 entire executor stall.
Lock ordering inconsistent: 매 deadlock. 매 always same order.
Cancellation 의 ignore: 매 dangling task / resource leak.
🧪 검증 / 중복
Verified (Hoare Communicating Sequential Processes, Go Memory Model 2022, Rust Async Book, JEP 444 (Java Virtual Threads), Python PEP 703).