| 255 | } |
| 256 | |
| 257 | int |
| 258 | NetAccept::accept_per_thread(int /* event ATS_UNUSED */, void * /* ep ATS_UNUSED */) |
| 259 | { |
| 260 | int listen_per_thread = 0; |
| 261 | REC_ReadConfigInteger(listen_per_thread, "proxy.config.exec_thread.listen"); |
| 262 | |
| 263 | if (listen_per_thread == 1) { |
| 264 | if (ats_is_unix(server.accept_addr)) { |
| 265 | auto id = this_ethread()->id; |
| 266 | ats_unix_append_id(&server.accept_addr.sun, id); |
| 267 | } |
| 268 | |
| 269 | if (do_listen()) { |
| 270 | Fatal("[NetAccept::accept_per_thread]:error listenting on ports"); |
| 271 | return -1; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | SET_HANDLER(&NetAccept::acceptFastEvent); |
| 276 | PollDescriptor *pd = get_PollDescriptor(this_ethread()); |
| 277 | if (this->ep.start(pd, this, EVENTIO_READ) < 0) { |
| 278 | Fatal("[NetAccept::accept_per_thread]:error starting EventIO"); |
| 279 | return -1; |
| 280 | } |
| 281 | return 0; |
| 282 | } |
| 283 | |
| 284 | void |
| 285 | NetAccept::init_accept_per_thread() |
nothing calls this directly
no test coverage detected