use configured timeout on abort, interrupt main

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3241 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2006-05-17 20:19:40 +00:00
parent 74327404a4
commit 17555e2fa6

View file

@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""Aggregate needed object instances for checker threads."""
import thread
import threading
import time
import logger
@ -30,6 +31,7 @@ def check_target (target):
except KeyboardInterrupt:
linkcheck.log.warn(linkcheck.LOG_CHECK,
"interrupt did not reach the main thread")
thread.interrupt_main()
except StandardError:
status.internal_error()
@ -95,6 +97,6 @@ class Aggregate (object):
def abort (self):
self.urlqueue.do_shutdown()
try:
self.urlqueue.join(timeout=10)
self.urlqueue.join(timeout=self.config["timeout"])
except linkcheck.cache.urlqueue.Timeout:
pass
linkcheck.log.warn(linkcheck.LOG_CHECK, "Abort timed out")