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

Function TSContScheduleOnPool_test

tests/tools/plugins/cont_schedule.cc:142–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void
143TSContScheduleOnPool_test()
144{
145 contp_1 = TSContCreate(TSContScheduleOnPool_handler_1, TSMutexCreate());
146 contp_2 = TSContCreate(TSContScheduleOnPool_handler_2, TSMutexCreate());
147
148 if (contp_1 == nullptr || contp_2 == nullptr) {
149 Dbg(dbg_ctl_schd, "[%s] could not create continuation", plugin_name);
150 abort();
151 } else {
152 Dbg(dbg_ctl_schd, "[%s] scheduling continuation", plugin_name);
153
154 TSContScheduleOnPool(contp_1, 0, TS_THREAD_POOL_NET);
155 TSContThreadAffinityClear(contp_1);
156 TSContScheduleOnPool(contp_1, 100, TS_THREAD_POOL_NET);
157
158 TSContScheduleOnPool(contp_2, 200, TS_THREAD_POOL_TASK);
159 TSContThreadAffinityClear(contp_2);
160 TSContScheduleOnPool(contp_2, 300, TS_THREAD_POOL_TASK);
161 }
162}
163
164static int
165TSContScheduleOnThread_handler_1(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