Pass multiple arguments to concurrent.futures.ThreadPoolExecutor()
Solution 1:
You can use lambda
function for your purposes:
from concurrent.futures import ThreadPoolExecutor
def test(var1, var2):
return var1 + var2
params = ['text1', 'text2']
process = concurrent.futures.ThreadPoolExecutor().submit(lambda p: test(*p), params)