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
- begin() const → task_buffer_iterator
- clear() → void
- delete_up_to(task_id target_tid) → void
- end() const → task_buffer_iterator
- find_task(task_id tid) const → task *
- get_current_task_count() const → size_t
- get_task(task_id tid) const → task *
- get_total_task_count() const → size_t
- has_task(task_id tid) const → bool
- put(reservation && reserve, std::unique_ptr<task> task) → void
- reserve_task_entry(const wait_callback & wc) → reservation
- revoke_reservation(reservation && reserve) → void
- wait_for_available_slot(const wait_callback & wc) const → void
Member Functions
¶task_buffer_iterator begin() const
task_buffer_iterator begin() const
¶void clear()
void clear()
¶void delete_up_to(task_id target_tid)
void delete_up_to(task_id target_tid)
Parameters
- task_id target_tid
¶task_buffer_iterator end() const
task_buffer_iterator end() const
¶task* find_task(task_id tid) const
task* find_task(task_id tid) const
Parameters
- task_id tid
¶size_t get_current_task_count() const
size_t get_current_task_count() const
¶task* get_task(task_id tid) const
task* get_task(task_id tid) const
Parameters
- task_id tid
¶size_t get_total_task_count() const
size_t get_total_task_count() const
¶bool has_task(task_id tid) const
bool has_task(task_id tid) const
Parameters
- task_id tid
¶void put(reservation&& reserve,
std::unique_ptr<task> task)
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)
reservation reserve_task_entry(
const wait_callback& wc)
Parameters
- const wait_callback& wc
¶void revoke_reservation(reservation&& reserve)
void revoke_reservation(reservation&& reserve)
Parameters
- reservation&& reserve
¶void wait_for_available_slot(
const wait_callback& wc) const
void wait_for_available_slot(
const wait_callback& wc) const
Parameters
- const wait_callback& wc