Menu

#Func

30 posts

Feed·
20 of 30 posts
Go's net/http Server.Shutdown: The Three-Stage Drain You Probably Skip
🖼️
0

Go's net/http Server.Shutdown: The Three-Stage Drain You Probably Skip

DEV Community·Gabriel Anhaia·25 days ago
#2DXPQ7VX
#stage#go#http#shutdown#context#func

Server.Shutdown is three stages, not one. The WebSocket trap, the background-goroutine trap, and the production drain pattern with errgroup.

15s
Read More
A Lock-Free Counter in Go: atomic, sync.Map, or Just a Mutex?
🖼️
0

A Lock-Free Counter in Go: atomic, sync.Map, or Just a Mutex?

DEV Community·Gabriel Anhaia·28 days ago
#ZJglIYZe
#when#go#concurrency#atomic#int64#sync

Three Go counters under contention. atomic wins for one hot counter. mutex is fine for batched updates. sync.Map almost never earns its keep.

15s
Read More
Deep Dive into SwiftWork (Part 4): Data Layer and Services — SwiftData, State Restore, Markdown Rendering
🖼️
0

Deep Dive into SwiftWork (Part 4): Data Layer and Services — SwiftData, State Restore, Markdown Rendering

DEV Community·NEE·29 days ago
#ZfscAh4H

SwiftData model design, AppStateManager state restoration, MarkdownRenderer Visitor pattern, Splash code highlighting, Keychain API key management, and automatic title generation with LLM.

15s
Read More