hpx/synchronization/channel_mpsc.hpp#
Defined in header 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, typename Mutex = hpx::util::spinlock, channel_mode = channel_mode::normal>
class base_channel_mpsc# Public Functions
-
base_channel_mpsc(base_channel_mpsc const &rhs) = delete#
-
base_channel_mpsc &operator=(base_channel_mpsc const &rhs) = delete#
-
inline base_channel_mpsc(base_channel_mpsc &&rhs) noexcept#
-
inline base_channel_mpsc &operator=(base_channel_mpsc &&rhs) noexcept#
-
inline ~base_channel_mpsc()#
-
inline bool is_empty() const noexcept#
-
inline bool set(T &&t) noexcept(noexcept(std::declval<std::unique_lock<mutex_type>&>().lock()) && noexcept(std::declval<std::unique_lock<mutex_type>&>().unlock()))#
Private Functions
Private Members
-
struct tail_data#
-
base_channel_mpsc(base_channel_mpsc const &rhs) = delete#
-
template<typename T, typename Mutex>
class base_channel_mpsc<T, Mutex, channel_mode::dont_support_close># - #include <channel_mpsc.hpp>
A bounded, lock-free MPSC channel without close support.
This implementation is based on Dmitry Vyukov’s bounded MPSC queue algorithm. The internal ring buffer capacity is rounded up to the nearest power of two (at least 8) using
std::bit_ceilfor sequence bitmasking.capacity()returns the requested size, matching the behavior of the normalbase_channel_mpscspecialization; it represents a lower bound for the number of items the channel can hold.Note
Mutex is an unused template parameter retained for compatibility with the primary template
base_channel_mpsc<T, Mutex, Mode>.Public Functions
-
base_channel_mpsc(base_channel_mpsc const &rhs) = delete#
-
base_channel_mpsc &operator=(base_channel_mpsc const &rhs) = delete#
-
inline base_channel_mpsc(base_channel_mpsc &&rhs) noexcept#
-
inline base_channel_mpsc &operator=(base_channel_mpsc &&rhs) noexcept#
-
~base_channel_mpsc() = default#
-
inline bool is_empty() const noexcept#
Private Members
-
template<>
struct cell_type#
-
base_channel_mpsc(base_channel_mpsc const &rhs) = delete#
-
template<typename T, typename Mutex = hpx::util::spinlock, channel_mode = channel_mode::normal>
-
namespace local
-
namespace lcos