def __del__(self):
## thrd = PoolThread()
print 'pool del'
self.exit()
def exit(self):
for thrd in self.__threadList:
thrd.exit()
self.__threadList = []
self.__maxThread = 0
self.__freeThread = 0
try:
tp = ThreadPool(5, threadEntry)
tp.start_thread()
tp.wait_for_all_thread_free()
proj.set_data_size(50)
tp.start_all_thread(threadEntry2)
tp.wait_for_all_thread_free()
tp.exit()
except Exception,e:
print e
traceback.print_exc()