柚子快报邀请码778899分享:python多线程并且发回结果

http://yzkb.51969.com/

 

 

import threading

class MyThread(threading.Thread):

def __init__(self, func, args):

super(MyThread, self).__init__()

self.func = func

self.args = args

def run(self):

self.result = self.func(*self.args)

def get_result(self):

try:

return self.result

except Exception:

return None

 

柚子快报邀请码778899分享:python多线程并且发回结果

http://yzkb.51969.com/

文章来源

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。