예제 #1
0
파일: __init__.py 프로젝트: dswd/ToMaTo
def _stopHelper():
	stopped.wait(10)
	if stopped.isSet():
		return
	print >>sys.stderr, "Stopping takes long, waiting some more time..."
	stopped.wait(10)
	if stopped.isSet():
		return
	print >>sys.stderr, "Ok last chance, killing process in 10 seconds..."
	stopped.wait(10)
	if stopped.isSet():
		return
	print >>sys.stderr, "Some threads are still running:"
	_printStackTraces()
	print >>sys.stderr, "Killing process..."
	process.kill(os.getpid(), force=True)
예제 #2
0
def _stopHelper():
    stopped.wait(10)
    if stopped.isSet() and threading.activeCount() == 1:
        return
    print >> sys.stderr, "Stopping takes long, waiting some more time..."
    stopped.wait(10)
    if stopped.isSet() and threading.activeCount() == 1:
        return
    print >> sys.stderr, "Ok last chance, killing process in 10 seconds..."
    stopped.wait(10)
    if stopped.isSet() and threading.activeCount() == 1:
        return
    print >> sys.stderr, "Some threads are still running:"
    _printStackTraces()
    print >> sys.stderr, "Killing process..."
    process.kill(os.getpid(), force=True)
예제 #3
0
파일: __init__.py 프로젝트: dswd/ToMaTo
def _stopHelper():
	stopped.wait(10)
	if stopped.isSet() and threading.activeCount() == 1:
		return
	print >>sys.stderr, "Stopping takes long. Waiting 20 more seconds"
	stopped.wait(10)
	if stopped.isSet() and threading.activeCount() == 1:
		return
	print >>sys.stderr, "Killing process in 10 seconds..."
	stopped.wait(10)
	if stopped.isSet() and threading.activeCount() == 1:
		return
	print >>sys.stderr, "Some threads are still running:"
	_printStackTraces()
	print >>sys.stderr, "Killing process..."
	process.kill(os.getpid(), force=True)