Create, setup and schedule the background fetch continuation.
| 306 | |
| 307 | // Create, setup and schedule the background fetch continuation. |
| 308 | void |
| 309 | BgFetchData::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 |
no test coverage detected