Re: [ros-users] handling multiple topics in Python

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Mayton
Date:  
To: ros-users
New-Topics: [ros-users] Video streaming node
Subject: Re: [ros-users] handling multiple topics in Python
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.)