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

Function end

lib_acl_cpp/samples/http_request_manager/main.cpp:52–81  ·  view source on GitHub ↗

�����˳�ǰ������Դ

Source from the content-addressed store, hash-verified

50
51// �����˳�ǰ������Դ
52static void end(void)
53{
54 // �����̳߳�
55 acl_pthread_pool_destroy(__thr_pool);
56
57#if 0
58 int n = 10;
59 printf("\r\n>>>sleep %d seconds to stop monitor\r\n", n);
60 sleep_while(n);
61#endif
62
63 // ��ӡ�������ӳؼ�Ⱥ�Ĵ��״̬
64 printf("\r\n");
65 std::vector<connect_pool*>& pools = __conn_manager->get_pools();
66 std::vector<connect_pool*>::const_iterator cit = pools.begin();
67 for (; cit != pools.end(); ++cit) {
68 printf(">>>server: %s, %s\r\n",
69 (*cit)->get_addr(), (*cit)->aliving()
70 ? "alive" : "dead");
71 }
72 printf("\r\n>>> STOPPING check thread now\r\n");
73
74 // ֹͣ��̨����߳�
75 acl::connect_monitor* monitor = __conn_manager->stop_monitor(true);
76 // ɾ�����������
77 delete monitor;
78
79 // �������ӳ�
80 delete __conn_manager;
81}
82
83// HTTP ������̣�����������������ӷ�������ȡ��Ӧ����
84static bool http_get(http_request* conn, const char* addr, int n)

Callers 1

mainFunction · 0.70

Calls 7

acl_pthread_pool_destroyFunction · 0.85
beginMethod · 0.80
stop_monitorMethod · 0.80
sleep_whileFunction · 0.70
endMethod · 0.45
get_addrMethod · 0.45
alivingMethod · 0.45

Tested by

no test coverage detected