Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fire
- import concurrent.futures
- import time
- class MeThread():
- def fake(self, i):
- print("start", i)
- time.sleep(5)
- print("end", i)
- def download(self, directory, count=1, max_workers=10, bucket='biophy-tuh'):
- with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
- for i in range(0, count):
- executor.submit(self.fake(i))
- if __name__ == '__main__':
- fire.Fire(MeThread)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement