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

Function thread_plugin

example/plugins/c-api/thread_1/thread_1.cc:42–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static int
43thread_plugin(TSCont contp ATS_UNUSED, TSEvent event, void *edata)
44{
45 switch (event) {
46 case TS_EVENT_HTTP_OS_DNS:
47 /**
48 * Check if the thread has been created successfully or not.
49 * If the thread has not been created successfully, assert.
50 */
51 if (!TSThreadCreate(reenable_txn, edata)) {
52 TSReleaseAssert(!PLUGIN_NAME " - Failure in thread creation");
53 }
54 return 0;
55 default:
56 break;
57 }
58 return 0;
59}
60
61void
62TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)

Callers

nothing calls this directly

Calls 1

TSThreadCreateFunction · 0.85

Tested by

no test coverage detected