Which major OS / platforms implement wait morphing? This question came up when I noticed that there’s no clearcut best practice about whether one should signal a condition variable with mutex locked or not. A typical recommendation is to signal while holding the lock unless profiling shows a substantial performance improvement overhead from unlocking (by removing an extra context switch).
Tag: language-agnostic
how can I diff two sections of the same file?
I have a source file with two similar yet subtly different sections. I’d like to merge the two sections into one subroutine with a parameter that handles the subtle differences, but I need to be sure I’m aware of them all so I don’t miss any. What I usually do in such cases is copy each of the sections to