| 12874 | } |
| 12875 | |
| 12876 | void SpinLock::enter() const noexcept |
| 12877 | { |
| 12878 | if (! tryEnter()) |
| 12879 | { |
| 12880 | for (int i = 20; --i >= 0;) |
| 12881 | if (tryEnter()) |
| 12882 | return; |
| 12883 | |
| 12884 | while (! tryEnter()) |
| 12885 | Thread::yield(); |
| 12886 | } |
| 12887 | } |
| 12888 | |
| 12889 | #if JUCE_UNIT_TESTS |
| 12890 |
no test coverage detected