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

Method async_serve

rpc/rpc.cpp:382–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380 return 0;
381 }
382 static void* async_serve(void* args_)
383 {
384 bool &got_it = ((Context*)args_)->got_it;
385 Context context(std::move(*(Context*)args_));
386 got_it = true;
387 thread_yield();
388 context.serve_request();
389 // serve done, here reduce refcount
390 (*context.stream_serv_count) --;
391 context.stream_cv->notify_all();
392 return nullptr;
393 }
394 virtual int shutdown(bool no_more_requests) override {
395 m_running = !no_more_requests;
396 while (m_list) {

Callers

nothing calls this directly

Calls 3

thread_yieldFunction · 0.85
serve_requestMethod · 0.80
notify_allMethod · 0.45

Tested by

no test coverage detected