MCPcopy Create free account
hub / github.com/apache/trafficserver / init_accept_per_thread

Method init_accept_per_thread

src/iocore/net/UnixNetAccept.cc:284–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284void
285NetAccept::init_accept_per_thread()
286{
287 int i, n;
288 int listen_per_thread = 0;
289
290 REC_ReadConfigInteger(listen_per_thread, "proxy.config.exec_thread.listen");
291
292 if (listen_per_thread == 0) {
293 if (do_listen()) {
294 Fatal("[NetAccept::accept_per_thread]:error listenting on ports");
295 return;
296 }
297 }
298
299 SET_HANDLER(&NetAccept::accept_per_thread);
300 n = eventProcessor.thread_group[ET_NET]._count;
301
302 for (i = 0; i < n; i++) {
303 NetAccept *a = (i < n - 1) ? clone() : this;
304 EThread *t = eventProcessor.thread_group[ET_NET]._thread[i];
305 a->mutex = get_NetHandler(t)->mutex;
306 t->schedule_imm(a);
307 }
308}
309
310void
311NetAccept::stop_accept()

Callers 1

accept_internalMethod · 0.80

Calls 2

get_NetHandlerFunction · 0.85
schedule_immMethod · 0.45

Tested by

no test coverage detected