Thin Lock Implementation

dsimcha dsimcha at yahoo.com
Wed Aug 20 09:24:51 PDT 2008


Thin locks sounds pretty cool, but I do have one question.  It seems like
automatically inflating the lock the first time contention is detected is a fairly
inefficient strategy, since the lock may be contested, but very infrequently.
Would it be possible to keep track of the frequency of contesting and, if the lock
is contested only, say, 1% of the time, just leave it as a spinlock?



More information about the Digitalmars-d mailing list