I am thinking here: If you have 2 threads executing FAST operations that need to be synchronized, isn't a nonblocking approach faster/better than a blocking/context switch approach?
By non-blocking I mean something like:
while(true) { if (checkAndGetTheLock()) break; }
The only thing I can think of is starvation (with CPU burn out) if you have too many threads looping around the lock.
How do I balance one approach versus the other?