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

Method foreground_lock

thread/thread.cpp:495–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493
494 public:
495 void foreground_lock() {
496 // lock
497 foreground_locked.store(true, std::memory_order_release);
498
499 // wait if (unlikely) background locked
500 wait_while(background_locked);
501 }
502 bool background_try_lock() {
503 while(true) {
504 // wait if (unlikely) foreground locked

Callers 1

AtomicRunQMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected