Feb-12-2021, 04:28 PM
I think that's because you're trying to access the value within the Manager, after the manager's been cleaned up from the with block. Try this:
if __name__ == '__main__': with multiprocessing.Manager() as manager: with multiprocessing.Pool(6) as p: error_value = manager.Value('i', 0) args = itertools.product(input_list, [error_value]) results = p.map(get_data, args) for result in results: ... print("Total errors:", error_value.value)