Turi Create  4.0
turi::lockfree_push_back< Container, T > Class Template Reference

#include <core/parallel/lockfree_push_back.hpp>

Detailed Description

template<typename Container, typename T = typename Container::value_type>
class turi::lockfree_push_back< Container, T >

Provides a lock free way to insert elements to the end of a container. Container must provide 3 functions.

  • T& operator[](size_t idx)
  • void resize(size_t len)
  • size_t size()

resize(n) must guarantee that size() >= n. T& operator[](size_t idx) must succeed for idx < size() and must be safely executeable in parallel. size() must be safely executeable in parallel with resize().

Definition at line 70 of file lockfree_push_back.hpp.


The documentation for this class was generated from the following file: