Plurrrr

Wed 08 Dec 2021

Why your multiprocessing Pool is stuck

You’re using multiprocessing to run some code across multiple processes, and it just—sits there. It’s stuck.

You check CPU usage—nothing happening, it’s not doing any work.

What’s going on?

In many cases you can fix this with a single line of code—skip to the end to try it out—but first, it’s time for a deep-dive into Python brokenness and the pain that is POSIX system programming, using exciting and not very convincing shark-themed metaphors!

Source: Why your multiprocessing Pool is stuck (it’s full of sharks!), an article by Itamar Turner-Trauring.

Branchless Git

One Git usage pattern that I think is underused is the “branchless” workflow. The idea here is pretty intuitive if you’ve used trunk-based development: there’s just one “main” branch that everything gets merged into. No feature branches, no release branches, no hotfix branches.

The “branchless” workflow is, in a nutshell: You work in a stack of atomic commits which are all eventually intended to be merged into a single trunk branch. Each commit can become a pull request, and each pull request consists of a single commit.

Source: Branchless Git, an article by Ben Congdon.