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

Method start_loop

net/rsocket/rsocket.cpp:473–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471 }
472
473 int start_loop(bool block) override {
474 if (check_running())
475 LOG_ERROR_RETURN(EALREADY, -1, "Already listening");
476 m_block_serv = block;
477 if (block) return accept_loop();
478 auto loop = &RSocketServer::accept_loop;
479 auto th = photon::thread_create((photon::thread_entry&)loop, this);
480 thread_enable_join(th);
481 thread_yield_to(th);
482 return 0;
483 }
484 void terminate() final {
485 photon::thread* th = workth.exchange(nullptr);
486 if (!th) return;

Callers 15

TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
TESTFunction · 0.45
mainFunction · 0.45
TESTFunction · 0.45

Calls 3

thread_createFunction · 0.85
thread_enable_joinFunction · 0.85
thread_yield_toFunction · 0.85

Tested by 15

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
TESTFunction · 0.36
mainFunction · 0.36
TESTFunction · 0.36