19 #ifndef MIR_DISPATCH_MULTIPLEXING_DISPATCHABLE_H_ 20 #define MIR_DISPATCH_MULTIPLEXING_DISPATCHABLE_H_ 26 #include <initializer_list> 72 void add_watch(std::shared_ptr<Dispatchable>
const& dispatchee);
84 void add_watch(
Fd const& fd, std::function<
void()>
const& callback);
90 void remove_watch(std::shared_ptr<Dispatchable>
const& dispatchee);
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: blob.h:26
FdEvents relevant_events() const override
The set of file-descriptor events this Dispatchable handles.
MultiplexingDispatchable()
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
virtual ~MultiplexingDispatchable() noexcept
Fd watch_fd() const override
Get a poll()able file descriptor.
An adaptor that combines multiple Dispatchables into a single Dispatchable.
Definition: multiplexing_dispatchable.h:53
bool dispatch(FdEvents events) override
Dispatch one pending event.
void remove_watch(std::shared_ptr< Dispatchable > const &dispatchee)
Remove a watch from the dispatchable.
MultiplexingDispatchable & operator=(MultiplexingDispatchable const &)=delete
void add_watch(std::shared_ptr< Dispatchable > const &dispatchee)
Add a dispatchable to the adaptor.
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...