Skip to content
Advertisement

Tag: condition-variable

Which OS / platforms implement wait morphing optimization?

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).

Advertisement