[ros-users] handling multiple topics in Python
Brian Mayton
bmayton at gmail.com
Thu Apr 15 19:37:56 UTC 2010
On Apr 15, 2010, at 10:59 AM, Blaise Gassend wrote:
> Also, if you are using threads, SIGINT will only kill one of them even
> without rospy. You have to make sure that each thread exits after a
> KeyboardInterrupt (or after rospy.is_shutdown() goes true in the case of
> rospy).
You can also call .isDaemon(True) on the threads when you create them. Threads that are marked as "daemon" threads will automatically exit when there are no non-daemon threads remaining (e.g. the main thread has exited after a SIGINT.)
More information about the ros-users
mailing list