ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Why pursue not stopping after the first message output?

asked 2011-09-16 03:00:41 -0500

sam gravatar image

My code is

 CPL> (top-level
         (format t "First~%")
           (format t "Third~%")
           (format t "Second~%"))


Why answer is not just 'First'?

Because cram tutorials doc says : 'Only the first form is executed. The other forms are evaporated.'

Thank you~

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-09-16 03:18:28 -0500

Lorenz gravatar image

updated 2011-09-16 03:20:43 -0500

Your code is slightly different from that one of the tutorial. The tutorial says:

    (format t "First~%")
      (sleep 2)
      (format t "Third~%"))
      (sleep 1)
      (format t "Second~%"))))

Please note the sleeps. What happens in your case is that all three forms terminate very quickly and pursue doesn't have a chance to evaporate any of the tasks. With the sleeps, you force Third and Second to take long enough to be evaporated.

edit flag offensive delete link more

Question Tools


Asked: 2011-09-16 03:00:41 -0500

Seen: 180 times

Last updated: Sep 16 '11