How to end all tasks in a ThreadPoolExecutor if one of them can throw an exception

前端 未结 0 2040
鱼传尺愫
鱼传尺愫 2020-11-22 01:54

I have one task that I want to do:

def task(body):
    # some logic that which can throw an exception
    # if something goes wrong
    do_task(body) 
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题