> Similarly, workloads where threads frequently access and modify the same objects show reduced improvements or even degradation due to lock contention.
Perhaps I'm stating the obvious, but you deal with this with lock-free data structures, immutable data, siloing data per thread, fine-grain locks, etc.
Basically you avoid locks as much as possible.
It'd be nice if Python std lib had more thread safe primitives/structures (compared to something like Java where there's tons of thread safe data structures)
Imo the GIL was used as an excuse for a long time to avoid building those out.