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

Function TSContScheduleOnThread_test

tests/tools/plugins/cont_schedule.cc:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void
203TSContScheduleOnThread_test()
204{
205 contp_1 = TSContCreate(TSContScheduleOnThread_handler_1, TSMutexCreate());
206 contp_2 = TSContCreate(TSContScheduleOnThread_handler_2, TSMutexCreate());
207
208 if (contp_1 == nullptr || contp_2 == nullptr) {
209 Dbg(dbg_ctl_schd, "[%s] could not create continuation", plugin_name);
210 abort();
211 } else {
212 Dbg(dbg_ctl_schd, "[%s] scheduling continuation", plugin_name);
213 TSContScheduleOnPool(contp_1, 0, TS_THREAD_POOL_NET);
214 TSContThreadAffinityClear(contp_1);
215 TSContScheduleOnPool(contp_1, 200, TS_THREAD_POOL_NET);
216 }
217}
218
219static int
220TSContScheduleOnEntirePool_handler(TSCont /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_UNUSED */)

Callers 1

LifecycleHookTracerFunction · 0.85

Calls 5

TSContCreateFunction · 0.85
TSMutexCreateFunction · 0.85
abortFunction · 0.85
TSContScheduleOnPoolFunction · 0.85

Tested by

no test coverage detected