MCPcopy Create free account
hub / github.com/acl-dev/acl / thread_pool_main

Function thread_pool_main

lib_acl_cpp/src/ipc/ipc_service.cpp:50–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50static void thread_pool_main(REQ_CTX* ctx)
51{
52
53#ifdef ACL_WINDOWS
54 HWND hWnd = ctx->req->get_hwnd();
55 if (hWnd != NULL) {
56 ctx->req->run(hWnd);
57 } else
58#endif
59 if (ctx->service) {
60 ipc_client* ipc = ctx->service->peek_conn();
61 if (ipc == NULL) {
62 logger_error("peek connect to %s error: %s",
63 ctx->addr, last_serror());
64 } else {
65 ctx->req->run(ipc);
66
67 // �������������Ȼ��������������ӳ���
68 if (ipc->active()) {
69 ctx->service->push_conn(ipc);
70 }
71
72 // �������ͷŶ�̬����
73 else {
74 delete ipc;
75 }
76 }
77 } else {
78 // IO ��Ϣģʽ
79
80 ipc_client* ipc = NEW ipc_client(ctx->magic);
81
82 // ������Ϣ������, ����ͬ��IPCͨ����ʽ
83 if (!ipc->open(ctx->addr, 0)) {
84 logger_error("open %s error(%s)",
85 ctx->addr, last_serror());
86 }
87
88 // ���������������������
89 else {
90 ctx->req->run(ipc);
91 }
92
93 // ���� IPC ��
94 delete ipc;
95 }
96
97 // �ͷ������߳��з���Ķ���
98 acl_myfree(ctx);
99}
100
101static void* thread_once_main(REQ_CTX* ctx)
102{

Callers

nothing calls this directly

Calls 7

activeMethod · 0.80
push_connMethod · 0.80
last_serrorFunction · 0.50
ipc_clientClass · 0.50
runMethod · 0.45
peek_connMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…