MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / ScopedLockHead

Method ScopedLockHead

thread/thread.cpp:1676–1677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674 {
1675 thread* _th;
1676 ScopedLockHead(waitq* waitq) :
1677 _th(indirect_lock(&waitq->q.th)) { }
1678 operator thread*() { return _th; }
1679 thread* operator->() { return _th; }
1680 ~ScopedLockHead() { if (_th) _th->lock.unlock(); }

Callers

nothing calls this directly

Calls 1

indirect_lockFunction · 0.85

Tested by

no test coverage detected