`

python多线程

阅读更多

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()

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics