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

Method accept_per_thread

src/iocore/net/UnixNetAccept.cc:257–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257int
258NetAccept::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
284void
285NetAccept::init_accept_per_thread()

Callers

nothing calls this directly

Calls 5

ats_is_unixFunction · 0.85
this_ethreadFunction · 0.85
ats_unix_append_idFunction · 0.85
get_PollDescriptorFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected