�����˳�ǰ������Դ
| 50 | |
| 51 | // �����˳�ǰ������Դ |
| 52 | static 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 ������̣�����������������ӷ�������ȡ��Ӧ���� |
| 84 | static bool http_get(http_request* conn, const char* addr, int n) |
no test coverage detected