I need some help with python pool.
def read_values(entry, second):
....
async_output = pool.map_async(partial(read_values, second='second'), string_array)
output_array = async_output.get()
The above code is working. I really want the below:
logfile = open("./async.log", "a+", 1)
def read_values(entry, second):
....
async_output = pool.map_async(partial(read_values, second=logfile), string_array)
output_array = async_output.get()
This is not working!
Is it possible to pass an open file reference to a pool?