MCPcopy Create free account
hub / github.com/Netis/cloud-probe / task_manager_destroy

Function task_manager_destroy

cpworker/src/task.c:419–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419void task_manager_destroy()
420{
421 task_manager_t *this = &task_mgr;
422
423 task_t *item;
424 task_t *titem;
425 TAILQ_FOREACH_SAFE(item, this->tasks, next, titem)
426 {
427 capture_task_destroy(item->task);
428 TAILQ_REMOVE(this->tasks, item, next);
429 free_task(item);
430 }
431
432 task_error_t *err_item;
433 task_error_t *err_titem;
434 TAILQ_FOREACH_SAFE(err_item, this->errors, next, err_titem)
435 {
436 TAILQ_REMOVE(this->errors, err_item, next);
437 free_task_error(err_item);
438 }
439
440 free_config(this->config);
441 free(this->tasks);
442 free(this->errors);
443 if (this->ring)
444 spsc_ring_destroy(this->ring);
445 if (this->alloc)
446 simple_allocator_destroy(this->alloc);
447}
448
449void task_manager_print_errors()
450{

Callers 2

task_manager_newFunction · 0.85
mainFunction · 0.85

Calls 6

capture_task_destroyFunction · 0.85
free_task_errorFunction · 0.85
free_configFunction · 0.85
spsc_ring_destroyFunction · 0.85
simple_allocator_destroyFunction · 0.85
free_taskFunction · 0.70

Tested by

no test coverage detected