gruel::condition_variable input_cond;
bool output_changed;
gruel::condition_variable output_cond;
+ bool msg_pending;
gr_tpb_detail()
- : input_changed(false), output_changed(false) {}
-
+ : input_changed(false), output_changed(false), msg_pending(false) { }
//! Called by us to tell all our upstream blocks that their output may have changed.
void notify_upstream(gr_block_detail *d);
output_changed = false;
}
+ //! Called to notify us that a message is pending in the queue
+ void notify_msg()
+ {
+ gruel::scoped_lock guard(mutex);
+ msg_pending = true;
+ input_cond.notify_one();
+ output_cond.notify_one();
+ }
+
private:
//! Used by notify_downstream
output_changed = true;
output_cond.notify_one();
}
-
};
#endif /* INCLUDED_GR_TPB_DETAIL_H */