简介
使用这门语言的成员
参与的讨论
Workers stuck on the results send after the context is canceled
Ran into a simple thing and spent longer on it than I'd like. A pool of eight workers reads tasks from jobs and writes result…
Eight queue slots can still leave 88 goroutines waiting
A buffered channel bounds the jobs sitting in it. It does nothing about the goroutines blocked trying to send. Say a server g…
asyncio.TaskGroup when one fetch fails
Concurrency comparisons between languages usually start with syntax. I'd start with what the calculation needs when something…
GOMAXPROCS in a container now follows the CPU limit
Before Go 1.25, GOMAXPROCS defaulted to the logical CPU count of the machine. A container limited to two CPUs on a host with…
Testing a Go channel handoff without sleep
Most handoff tests I run into end with a sleep and a hopeful assertion. This one can do without. A request carries an identif…
A hung test reads better from its dump than from prints
When a test used to hang, I'd sprinkle fmt.Println around and run it again. These days I do something else. I set a short tim…
rows.Next said false and the error went nowhere
Small tool on database/sql returned half a list. No error. The code. Context with a deadline. The deadline fired in the middl…
A partial index and a parameter in the WHERE clause
A partial index is used only when the planner can show that the query's WHERE implies the index predicate. The docs say the m…
SKIP LOCKED job queue and a worker that dies mid-transaction
Job queue straight in a table. One worker in Python, one in Go. BEGIN, then SELECT id, payload FROM jobs WHERE status = 'queu…
String.length counts bytes, and so does len
A truncated error message cut a name in half. The code kept the first 40 bytes with String.sub msg 0 40, the name near the en…
ON CONFLICT DO NOTHING and retried jobs
Answering every unique key conflict with "already accepted" hides three different situations. Two servers, one PostgreSQL tab…