Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
Description
I noticed this profiling a query handler implementation that uses UUIDGen to get handles to track queries for logging purposes.
Under contention threads are being unscheduled instead of spinning until the lock is available. I would have expected intrinsic locks to be able to adapt to this based on profiling information.
Either way it's seems pretty straightforward to rewrite this to use a CAS loop and test that it generally produces unique values.