| 54 | } |
| 55 | |
| 56 | void TSpinWait::Wait() |
| 57 | { |
| 58 | if (Y_LIKELY(SpinIteration_++ < SpinIterationCount)) { |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | SpinIteration_ = 0; |
| 63 | |
| 64 | if (SlowPathStartInstant_ < 0) { |
| 65 | SlowPathStartInstant_ = GetCpuInstant(); |
| 66 | } |
| 67 | |
| 68 | Sleep(SuggestSleepDelay(SleepIteration_++)); |
| 69 | } |
| 70 | |
| 71 | //////////////////////////////////////////////////////////////////////////////// |
| 72 |
no test coverage detected