How do connections recycle in a multiprocess pool serving requests from a single requests.Session object in python?
问题 Below is the complete code simplified for the question. ids_to_check returns a list of ids. For my testing, I used a list of 13 random strings. #!/usr/bin/env python3 import time from multiprocessing.dummy import Pool as ThreadPool, current_process as threadpool_process import requests def ids_to_check(): some_calls() return(id_list) def execute_task(id): url = f"https://myserver.com/todos/{ id }" json_op = s.get(url,verify=False).json() value = json_op['id'] print(str(value) + '-' + str