Skip to content

Commit d6660a8

Browse files
author
iRobot ROS
authored
Merge pull request #35 from mauropasse/mauro/irobot-add-events-executor
Documentation updates
2 parents 39e5a7c + f04d13c commit d6660a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rclcpp/include/rclcpp/executors/timers_manager.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ namespace executors
4040
*
4141
* Timers management
4242
* This class provides APIs to add and remove timers.
43-
* This class keeps ownership of the added timers through a shared pointer.
43+
* It keeps a list of weak pointers from added timers, and owns them only when
44+
* have expired and need to be executed.
4445
* Timers are kept ordered in a binary-heap priority queue.
4546
* Calls to add/remove APIs will temporarily block the execution of the timers and
4647
* will require to reorder the internal priority queue of timers.
@@ -73,8 +74,9 @@ class TimersManager
7374
~TimersManager();
7475

7576
/**
76-
* @brief Adds a new TimerBase to the storage.
77-
* This object will keep ownership of the timer.
77+
* @brief Adds a new TimerBase::WeakPtr to the storage.
78+
* This object will store a weak pointer of the added timer
79+
* in a heap data structure.
7880
* @param timer the timer to be added
7981
*/
8082
void add_timer(rclcpp::TimerBase::SharedPtr timer);

0 commit comments

Comments
 (0)