并发与分布式系统
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…
Marking the filter async did nothing for the freeze
Search filters a list of around forty thousand rows, and the UI freezes for a moment on every query. I figured async was the…
asyncio.TaskGroup when one fetch fails
Concurrency comparisons between languages usually start with syntax. I'd start with what the calculation needs when something…
Isolate.run took my whole Loader with it
Moved a big JSON decode off the main isolate with Isolate.run and got an error about an unsendable object instead of a speedu…
A println inside the swap! function
The docs for swap! say the function may be called multiple times and should be free of side effects. Code in the wild still l…
Does start_link returning mean the cache is warm?
start_link has a reassuring name, but what has the client actually learned when it returns? Here init returns {:ok, state, {:…
The Erlang and Elixir docs disagree about late call replies
The two sets of docs disagree about a call that timed out. The gen_server reference says that since OTP 24 calls go through a…
ON CONFLICT DO NOTHING and retried jobs
Answering every unique key conflict with "already accepted" hides three different situations. Two servers, one PostgreSQL tab…
Doctests only ever show the happy reply
I love doctests. iex> lines inside @doc that run under doctest Counter keep examples honest, and for a pure pipeline of trans…
Causality in merged mailbox logs
A merged mailbox log that reads A1, B1, B2, A2 tells you less than it seems to. A sends A1 then A2, B sends B1 then B2, one r…