Skip to main content

class task_ring_buffer

Declaration

class task_ring_buffer { /* full declaration omitted */ };

Member Variables

task_id m_next_task_id = 0
std::atomic<task_id> m_next_active_tid = celerity::detail::task_id(0)
std::atomic<size_t> m_number_of_deleted_tasks = 0
std::array<std::unique_ptr<task>, task_ringbuffer_size> m_data

Member Aliases

  • using wait_callback = std::function<void(task_id)>;

Member Function Overview

Member Functions

task_buffer_iterator begin() const


void clear()


void delete_up_to(task_id target_tid)

Parameters

task_id target_tid

task_buffer_iterator end() const


task* find_task(task_id tid) const

Parameters

task_id tid

size_t get_current_task_count() const


task* get_task(task_id tid) const

Parameters

task_id tid

size_t get_total_task_count() const


bool has_task(task_id tid) const

Parameters

task_id tid

void put(reservation&& reserve,
         std::unique_ptr<task> task)

Parameters

reservation&& reserve
std::unique_ptr<task> task

reservation reserve_task_entry(
    const wait_callback& wc)

Parameters

const wait_callback& wc

void revoke_reservation(reservation&& reserve)

Parameters

reservation&& reserve

void wait_for_available_slot(
    const wait_callback& wc) const

Parameters

const wait_callback& wc