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

Function work_pool_init

thread/std-compat.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46int work_pool_init(int vcpu_num, int event_engine, int io_engine) {
47 if (g_work_pool != nullptr) {
48 log_error("work pool has been initialized");
49 return -1;
50 }
51 if (vcpu_num < 1) {
52 log_error("Invalid vcpu_num");
53 return -1;
54 }
55 g_work_pool = new photon::WorkPool(vcpu_num, event_engine, io_engine, -1);
56 return 0;
57}
58
59int work_pool_fini() {
60 if (g_work_pool == nullptr) {

Callers 3

TESTFunction · 0.85
GlobalEnvMethod · 0.85
TESTFunction · 0.85

Calls 1

log_errorFunction · 0.85

Tested by 3

TESTFunction · 0.68
GlobalEnvMethod · 0.68
TESTFunction · 0.68