Unnecessary yielding negates any performance advantage spinlocks have over critical sections, while insufficient yielding can occasionally cause drastic performance degradation if a thread is preempted while owning a spinlock.
调试欢乐多
Would you please do me a favor to have it translated into chinese?
THX!
For this reason, you should use critical sections instead.
((Unnecessary yielding) negates( (any performance advantage spinlocks have )over (critical sections))), while (((insufficient yielding)( can occasionally cause) (drastic performance degradation ))if (a thread is preempted while owning a spinlock).
Thanks all the same!