hpx/synchronization/channel_mpmc.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_mpmc = bounded_channel<T, hpx::spinlock>
template<typename T, typename Mutex = util::spinlock>
class bounded_channel

Public Functions

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

Protected Functions

std::size_t close(std::unique_lock<mutex_type> &l)

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<mutex_type> mtx_
hpx::util::cache_aligned_data<std::size_t> head_
hpx::util::cache_aligned_data<std::size_t> tail_
std::size_t size_
std::unique_ptr<T[]> buffer_
bool closed_