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 @@ -120,14 +120,20 @@ class Tree
120120 [[nodiscard]] TreeNode* rootNode () const ;
121121
122122 /* *
123- * @brief Sleep for a certain amount of time. This sleep could be interrupted by the method TreeNode::emitWakeUpSignal()
123+ * @brief Sleep for a certain amount of time. This sleep could be interrupted by the methods
124+ * TreeNode::emitWakeUpSignal() or Tree::emitWakeUpSignal()
124125 *
125126 * @param timeout duration of the sleep
126127 * @return true if the timeout was NOT reached and the signal was received.
127128 *
128129 * */
129130 bool sleep (std::chrono::system_clock::duration timeout);
130131
132+ /* *
133+ * @brief Wake up the tree. This will interrupt the sleep() method.
134+ */
135+ void emitWakeUpSignal ();
136+
131137 ~Tree ();
132138
133139 // / 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