MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / enter

Method enter

3rdparty/Amalgamate/juce_core_amalgam.cpp:12876–12887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12874}
12875
12876void 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

Callers 4

GenericScopedLockMethod · 0.80
~GenericScopedUnlockMethod · 0.80
ScopedLockTypeMethod · 0.80
enterWriteMethod · 0.80

Calls 1

tryEnterFunction · 0.85

Tested by

no test coverage detected