Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Remove some unnecessary spinning #21437

Merged
merged 3 commits into from
Dec 8, 2018
Merged

Commits on Dec 7, 2018

  1. Remove some unnecessary spinning

    Most of the use of SpinWait in CoreLib involves waiting for some short-lived operation to complete on another thread, in which case the spinning thread should backoff as it's unable to make forward progress until the other operation completes.  In a few cases, however, SpinWait is being used just around CompareExchange operations, such that at least one thread running this code path is guaranteed to make forward progress, and the backoff in the spinning doesn't actually help (in theory it could help to reduce contention if lots of threads were all trying to CompareExchange concurrently, but in such cases you'd actually want more randomized backoff, as otherwise it's likely all the threads would re-attempt at around the same time and similarly re-encounter contention).
    stephentoub committed Dec 7, 2018
    Configuration menu
    Copy the full SHA
    05d48bb View commit details
    Browse the repository at this point in the history
  2. Address PR feedback

    stephentoub committed Dec 7, 2018
    Configuration menu
    Copy the full SHA
    74af7ae View commit details
    Browse the repository at this point in the history
  3. Address more PR feedback

    stephentoub committed Dec 7, 2018
    Configuration menu
    Copy the full SHA
    7d93d80 View commit details
    Browse the repository at this point in the history