MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / PopFront

Method PopFront

src/hx/Thread.cpp:69–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69 Dynamic PopFront(bool inBlock)
70 {
71 hx::EnterGCFreeZone();
72 AutoLock lock(mMutex);
73 if (!inBlock)
74 {
75 hx::ExitGCFreeZone();
76 return shift();
77 }
78 // Ok - wait for something on stack...
79 while(!length)
80 {
81 mSemaphore.Reset();
82 lock.Unlock();
83 mSemaphore.Wait();
84 lock.Lock();
85 }
86 hx::ExitGCFreeZone();
87 if (length==1)
88 mSemaphore.Reset();
89 return shift();
90 }
91 #else
92 void PushBack(Dynamic inValue)
93 {

Callers 1

__hxcpp_deque_popFunction · 0.80

Calls 9

EnterGCFreeZoneFunction · 0.85
ExitGCFreeZoneFunction · 0.85
QWaitMethod · 0.80
QSetMethod · 0.80
shiftFunction · 0.50
ResetMethod · 0.45
UnlockMethod · 0.45
WaitMethod · 0.45
LockMethod · 0.45

Tested by

no test coverage detected