import threading __author__ = "Amit Saha " __date__ = "$29 Nov, 2008 9:51:03 PM$" # 'child' thread class Parent (threading.Thread): def __init__(self, ThVar): """Documentation""" threading.Thread.__init__(self) self.ThVar = ThVar def run (self): print "Thread started with ID", threading.currentThread() print "Value recieved", self.ThVar for i in range (0, 100000): print "Active threads now", threading.activeCount() # Main thread #for i in range(0, 3): print "Active Threads", threading.activeCount() ThVar = 1 parent = Parent(ThVar) parent.start();