proomt

Search

Search posts, papers, and topics

All posts

LobstersAnton Zhiyanov30 min readtutorialintermediate

Go concurrency distilled

Summary

The article is a concise, example‑driven mini‑book that reviews Go’s core concurrency primitives—goroutines, channels, select, pipelines, and related patterns. It shows practical code snippets for coordination, cancellation, and safe channel usage, serving as a quick refresher for experienced Go developers.

  • Use sync.WaitGroup (or WaitGroup.Go) to wait for multiple goroutines and avoid premature exit.
  • Unbuffered channels block on send/receive; buffered channels act as FIFO queues and can be inspected with len/cap.
  • Declare channel direction (chan<- , <-chan) in function signatures to prevent accidental reads or writes.
  • select lets you multiplex channel operations, implement non‑blocking sends, and handle cancellation via a cancel channel.

Go engineers who need a fast, code‑first refresher on concurrency patterns will find it immediately applicable.

6/10

Related reading

  1. Go To Statement Considered Harmful

    Edsger Dijkstra argues that the `go to` statement should be abolished from higher-level programming languages due to its detrimental effect on program quality and readability. He posits that `go to` makes it difficult to reason about program state and progress, unlike structured control flow which provides clear, manageable execution coordinates.

    Hall of Fameutexas.edu7 min
  2. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min
  3. Database Branching: A Developer's Guide to Git-Style Workflows

    Database branching uses copy‑on‑write to give developers, CI jobs, and AI agents isolated database snapshots without full copies. Branches share unchanged data, store only deltas, and are disposable, enabling production‑like testing, per‑PR isolation, safe experimentation, and rapid cleanup. Safe operation requires protecting parent branches, using mock data, TTLs, and treating migrations as the…

    Databricksdatabricks.com9 min
  4. Concurrency Control: Your Aggregate Is Single-Threaded. Your Cluster Isn’t.

    This article distinguishes between serialization (preventing concurrent access) and arbitration (permitting access and rejecting losers) in distributed concurrency control. It argues that arbitration should be responsible for correctness, as serialization guarantees are conditional and can fail silently in multi-process environments, leading to data corruption.

    Atomic Objectatomicobject.com14 min