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

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Brian Mayton
日付:  
To: ros-users
新しいトピック: [ros-users] Video streaming node
題目: 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.)