1 #ifndef MF_UTILITY_EVENT_H_
2 #define MF_UTILITY_EVENT_H_
10 #include <type_traits>
45 std::is_same<
typename std::iterator_traits<It>::value_type,
event*>::value,
46 "arguments must be contiguous iterators with value_type event*"
48 event** begin = std::addressof(*begin_it);
49 event** end = std::addressof(*end_it);
54 template<
typename... Events>
56 std::array<
event*,
sizeof...(Events)> evs { &events... };
67 bool notified_ =
false;
void notify() override
Definition: event.h:72
static event & wait_any(Events &&...events)
Definition: event.h:55
Synchronization primitive representing event that a thread can wait for.
Definition: event.h:21
#define MF_ASSERT_MSG(condition, msg)
Definition: common.h:18
Event which is repeatedly received after having been notified once.
Definition: event.h:65
void reset()
Definition: event.h:82
event & operator=(const event &)=delete
static event & wait_any_list(It begin_it, It end_it)
Definition: event.h:43
friend bool operator!=(const event &a, const event &b)
Definition: event.h:37
float distance(const Eigen::Vector3f &pt, const plane &pl)
Definition: plane.cc:50
void wait() override
Definition: event.h:77
std::uintptr_t handle_
OS-specific handle.
Definition: event.h:23
static event * wait_any_(event **begin, event **end)
friend bool operator==(const event &a, const event &b)