Last active
December 14, 2015 01:59
-
-
Save azend/5010492 to your computer and use it in GitHub Desktop.
Simple python script to warm up a cold room
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import threading | |
class Worker(threading.Thread): | |
def run (self): | |
while True: | |
pass; | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description='Warming this place up one thread at a time.'); | |
parser.add_argument('--threads', type=int, nargs='?', default=1); | |
args = parser.parse_args(); | |
for x in range( args.threads ): | |
Worker().start(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment