Skip to content

Commit

Permalink
Merge pull request #672 from Affonso-Gui/fibonacci-server-cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada authored Sep 7, 2021
2 parents e45df01 + a79826d commit 44e37d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roseus/test/fibonacci-server.l
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
(let ((order (send goal :goal :order))
(sequence (list 1 0)) msg)
(dotimes (i (1- order))
(send server :spin-once)
(when (send server :is-preempt-requested)
(send server :set-preempted)
(return-from fibonacci-execute-cb nil))
(push (+ (car sequence) (cadr sequence)) sequence)
(setq msg (send server :feedback :sequence (reverse sequence)))
(send server :publish-feedback msg)
Expand Down

0 comments on commit 44e37d6

Please sign in to comment.