Three Concurrency Models — GIL, Virtual Thread, and Goroutine

CPython’s GIL serializes multithreaded execution and pushes work onto multiprocessing or asyncio. Java pinned threads 1:1 to the OS until virtual threads (Java 21) reopened the thread-per-request model. Go shipped with an M:N scheduler from day one. The model you start from decides whether your service goes thread-per-request, reactive, or multiprocess.

June 15, 2024 · 6 min read

Go Concurrency Model

Go’s concurrency model builds on CSP, providing Goroutines and Channels as core tools. An overview of how each works and when to choose what.

April 5, 2024 · 4 min read

concurrency-go

A record of implementing and benchmarking three Go concurrency patterns — mutex, channel, and lock-free — to build hands-on understanding.

April 3, 2024 · 3 min read

Optimistic and Pessimistic Locking

A transaction gives atomicity, a lock gives serialization — they aren’t substitutes. How pessimistic and optimistic locking cover the Lost Update that an isolation level’s plain reads don’t, and how to choose between them.

October 1, 2023 · 6 min read

rust-server

A record of implementing the multithreaded HTTP server from Rust Book Chapter 20, experiencing how ownership and concurrency safety are enforced at the type level.

March 13, 2022 · 4 min read