| 155 | } |
| 156 | |
| 157 | int main(int argc, char ** argv) { |
| 158 | //RoutineSetSpecificCallback(co_getspecific, co_setspecific); |
| 159 | if (argc < 4) { |
| 160 | showUsage(argc, argv); |
| 161 | exit(-1); |
| 162 | } |
| 163 | |
| 164 | signal(SIGPIPE, SIG_IGN); |
| 165 | phxsqlproxy::PHXSqlProxyConfig config; |
| 166 | if (config.ReadConfig(argv[1]) != 0) { |
| 167 | printf("ReadConfig [%s] failed\n", argv[1]); |
| 168 | showUsage(argc, argv); |
| 169 | exit(-1); |
| 170 | } |
| 171 | |
| 172 | int thread_num = atoi(argv[2]); |
| 173 | int routine_num = atoi(argv[3]); |
| 174 | |
| 175 | for (int i = 0; i < thread_num; ++i) { |
| 176 | TestPHXSqlProxyThread * thread = new TestPHXSqlProxyThread(&config, i, routine_num); |
| 177 | thread->start(); |
| 178 | } |
| 179 | co_eventloop(co_get_epoll_ct(), 0, 0); |
| 180 | return 0; |
| 181 | } |
| 182 | |
| 183 |
nothing calls this directly
no test coverage detected