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

Method schedule

plugins/background_fetch/background_fetch.cc:308–325  ·  view source on GitHub ↗

Create, setup and schedule the background fetch continuation.

Source from the content-addressed store, hash-verified

306
307// Create, setup and schedule the background fetch continuation.
308void
309BgFetchData::schedule()
310{
311 TSAssert(nullptr == _cont);
312
313 // Setup the continuation
314 _cont = TSContCreate(cont_bg_fetch, TSMutexCreate());
315 TSContDataSet(_cont, static_cast<void *>(this));
316
317 // Initialize the VIO stuff (for the fetch)
318 req_io_buf = TSIOBufferCreate();
319 req_io_buf_reader = TSIOBufferReaderAlloc(req_io_buf);
320 resp_io_buf = TSIOBufferCreate();
321 resp_io_buf_reader = TSIOBufferReaderAlloc(resp_io_buf);
322
323 // Schedule
324 TSContScheduleOnPool(_cont, 0, TS_THREAD_POOL_NET);
325}
326
327// Log format is:
328// remap-tag bytes status url

Callers 1

cont_check_cacheableFunction · 0.45

Calls 6

TSContCreateFunction · 0.85
TSMutexCreateFunction · 0.85
TSContDataSetFunction · 0.85
TSIOBufferCreateFunction · 0.85
TSIOBufferReaderAllocFunction · 0.85
TSContScheduleOnPoolFunction · 0.85

Tested by

no test coverage detected