3 ms·
It is not always performance that is the main consideration. If you are developing a library and so do not have control of how threads might be used with it the
by aardvark179 13y ago
It is not always performance that is the main consideration. If you are developing a library and so do not have control of how threads might be used with it then it may be vital to ensure a lock can never be held by a thread which could be suspended.
I agree though that the use should normally be contained to a small area and the details carefully abstracted away from the rest of the code because it takes real care to get the details right.