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

Method start_loop

net/kernel_socket.cpp:288–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286 }
287
288 int start_loop(bool block) override {
289 if (workth) LOG_ERROR_RETURN(EALREADY, -1, "Already listening");
290 m_block_serv = block;
291 if (block) return accept_loop();
292 auto loop = &KernelSocketServer::accept_loop;
293 auto th = thread_create((thread_entry&)loop, this);
294 thread_enable_join(th);
295 thread_yield_to(th);
296 return 0;
297 }
298
299 void terminate() final {
300 if (!workth) return;

Callers

nothing calls this directly

Calls 3

thread_createFunction · 0.85
thread_enable_joinFunction · 0.85
thread_yield_toFunction · 0.85

Tested by

no test coverage detected