From 60f4cf0f45fd28e9f1074932fbd21410952edc7d Mon Sep 17 00:00:00 2001 From: Guilherme Affonso Date: Thu, 17 Jun 2021 09:11:01 +0900 Subject: [PATCH] Check for preemption request on test/fibonacci-server.l --- roseus/test/fibonacci-server.l | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roseus/test/fibonacci-server.l b/roseus/test/fibonacci-server.l index 6c653aac3..6a12c7d97 100755 --- a/roseus/test/fibonacci-server.l +++ b/roseus/test/fibonacci-server.l @@ -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)