Skip to content

Commit

Permalink
Set context when creating Timer.
Browse files Browse the repository at this point in the history
rcl timer must create a guard condition in order to reset a canceled timer.
When calling rcl_create_timer, it will alls guard condition and it is need context.

Signed-off-by: Donghee Ye <donghee.ye@samsung.com>
  • Loading branch information
DongheeYe committed Mar 13, 2020
1 parent 211da41 commit b20d696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rclpy/rclpy/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def _wait_for_ready_callbacks(
timeout_timer = None
timeout_nsec = timeout_sec_to_nsec(timeout_sec)
if timeout_nsec > 0:
timeout_timer = Timer(None, None, timeout_nsec, self._clock)
timeout_timer = Timer(None, None, timeout_nsec, self._clock, context=self.context)

yielded_work = False
while not yielded_work and not self._is_shutdown:
Expand Down

0 comments on commit b20d696

Please sign in to comment.