3 ms·
In almost any implementation you don't want to track the owner because it is only an unnecessary overhead and nothing else. On a similar note the articles stri
by dfox 8y ago
In almost any implementation you don't want to track the owner because it is only an unnecessary overhead and nothing else.
On a similar note the articles strikes me as somewhat contrived example, because the most obvious implementation of reentrant mutex also does not care about the owner thread.
Edit: Another reason why it feel contrived is that in fact reentrant mutex represented as first class datastructure (in contrast to monitor as an language-level construct) is to some extent only an hack to solve issues stemming from improper design.