Skip to content

Instantly share code, notes, and snippets.

@azend
Last active December 14, 2015 01:59
Show Gist options
  • Save azend/5010492 to your computer and use it in GitHub Desktop.
Save azend/5010492 to your computer and use it in GitHub Desktop.
Simple python script to warm up a cold room
#!/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