hpx/synchronization/channel_mpsc.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace lcos
namespace local

Typedefs

template<typename T>
using channel_mpsc = base_channel_mpsc<T, hpx::spinlock>
template<typename T, typename Mutex = util::spinlock>
class base_channel_mpsc

Public Functions

base_channel_mpsc(std::size_t size)
base_channel_mpsc(base_channel_mpsc &&rhs)
base_channel_mpsc &operator=(base_channel_mpsc &&rhs)
~base_channel_mpsc()
bool get(T *val = nullptr) const
bool set(T &&t)
std::size_t close()
std::size_t capacity() const

Private Types

template<>
using mutex_type = Mutex

Private Functions

bool is_full(std::size_t tail) const
bool is_empty(std::size_t head) const

Private Members

hpx::util::cache_aligned_data<std::atomic<std::size_t>> head_
hpx::util::cache_aligned_data<tail_data> tail_
std::size_t size_
std::unique_ptr<T[]> buffer_
std::atomic<bool> closed_
struct tail_data

Public Members

template<>
mutex_type mtx_
template<>
std::atomic<std::size_t> tail_