I try to read files with multiprocessing in python. Here is a small example:
import multiprocessing
from time import *
class class1():
def function(self, datasheetname):
#here i start reading my datasheet
if __name__ == '__main__':
#Test with multiprosessing
pool = multiprocessing.Pool(processes=4)
pool.map(class1("Datasheetname"))
pool.close()
Now I get the following error:
TypeError: map() missing 1 required positional argument: 'iterable'
In another thread in this board I got the hint to do this with ThreadPool, but I don't know how to do that. Any ideas?