python多线程
class grapThread(threading.Thread):
def __init__(self,conf,mbconf):
threading.Thread.__init__(self)
self.requests=[]
def addRequest(self,request):
self.requests.append(request)
def run(self):
for rq in self.requests:
self.giop.grapData(rq.logday,rq.flightDay,rq.depCity,rq.arrCity)
self.giop.insertData()
print self.giop.getResult()
gt=grapThread(conf,mbconf)
gt.start()