def METHOD_NAME(testThread, stopFile):
	# parse the command line
	if len(sys.argv) < 4:
		writeOutput('Usage:\n\tpython %s <input file> <thread count> <output file> [<server1> <server2> .. ]' % os.path.basename(__file__))
		return 1
	(_, inputFile, threadCount, outputFile) = sys.argv[:4]
	threadCount = int(threadCount)	
	if len(sys.argv) == 7 and sys.argv[4] == 'child':
		curIndex = int(sys.argv[5])
		totalCount = int(sys.argv[6])
		serverList = []
	else:
		curIndex = 0
		totalCount = 1
		serverList = sys.argv[4:]
	# the following line makes use of worker processes on each server instead of threads
	if len(serverList) == 0 and threadCount > 1:
		serverList = ['-'] * threadCount
		threadCount = 1
	# parent
	if len(serverList) > 0:
		indexes = [curIndex + x * totalCount for x in range(len(serverList))]
		threadContexts = list(zip(serverList, indexes))
		sharedContext = (inputFile, threadCount, len(serverList) * totalCount, outputFile)
		runWorkerThreads(ParentThread, threadContexts, sharedContext)
		return 0
	# child
	sys.stderr.write('touch %s to stop\n' % stopFile)
	try:
		os.remove(stopFile)
	except OSError:
		pass
	writeOutput('Info: started')
	# run the worker threads
	threadContexts = [curIndex + x * totalCount for x in range(threadCount)]
	runWorkerThreads(testThread, threadContexts, (threadCount * totalCount, stopFile, inputFile))