File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,20 @@ class Tree
119119 [[nodiscard]] TreeNode* rootNode () const ;
120120
121121 /* *
122- * @brief Sleep for a certain amount of time. This sleep could be interrupted by the method TreeNode::emitWakeUpSignal()
122+ * @brief Sleep for a certain amount of time. This sleep could be interrupted by the methods
123+ * TreeNode::emitWakeUpSignal() or Tree::emitWakeUpSignal()
123124 *
124125 * @param timeout duration of the sleep
125126 * @return true if the timeout was NOT reached and the signal was received.
126127 *
127128 * */
128129 bool sleep (std::chrono::system_clock::duration timeout);
129130
131+ /* *
132+ * @brief Wake up the tree. This will interrupt the sleep() method.
133+ */
134+ void emitWakeUpSignal ();
135+
130136 ~Tree ();
131137
132138 // / Tick the root of the tree once, even if a node invoked
Original file line number Diff line number Diff line change @@ -519,6 +519,11 @@ bool Tree::sleep(std::chrono::system_clock::duration timeout)
519519 std::chrono::duration_cast<std::chrono::milliseconds>(timeout));
520520}
521521
522+ void Tree::emitWakeUpSignal ()
523+ {
524+ wake_up_->emitSignal ();
525+ }
526+
522527Tree::~Tree ()
523528{
524529 haltTree ();
You can’t perform that action at this time.
0 commit comments