19 #ifndef MIR_DISPATCH_MULTIPLEXING_DISPATCHABLE_H_ 20 #define MIR_DISPATCH_MULTIPLEXING_DISPATCHABLE_H_ 26 #include <initializer_list> 63 Fd watch_fd()
const override;
64 bool dispatch(
FdEvents events)
override;
65 FdEvents relevant_events()
const override;
72 void add_watch(std::shared_ptr<Dispatchable>
const& dispatchee);
76 void add_watch(std::shared_ptr<Dispatchable>
const& dispatchee,
DispatchReentrancy reentrancy);
84 void add_watch(
Fd const& fd, std::function<
void()>
const& callback);
90 void remove_watch(std::shared_ptr<Dispatchable>
const& dispatchee);
96 void remove_watch(
Fd const& fd);
99 std::list<std::pair<std::shared_ptr<Dispatchable>,
bool>> dispatchee_holder;
105 #endif // MIR_DISPATCH_MULTIPLEXING_DISPATCHABLE_H_ AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: sw_splash.h:26
DispatchReentrancy
How concurrent dispatch should be handled.
Definition: multiplexing_dispatchable.h:39
Implementation of the Mutex and SharedMutex C++14 concepts via POSIX pthread rwlock.
Definition: posix_rw_mutex.h:33
An adaptor that combines multiple Dispatchables into a single Dispatchable.
Definition: multiplexing_dispatchable.h:53
The dispatch function may be called on multiple threads simultaneously.
Definition: dispatchable.h:38
uint32_t FdEvents
Definition: dispatchable.h:36
The dispatch function is guaranteed not to be called while a thread is currently running it...