Error using pexpect and multiprocessing? error “TypError: cannot serialize '_io.TextIOWrapper' object”
问题 I have a Python 3.7 script on a Linux machine where I am trying to run a function in multiple threads, but when I try I receive the following error: Traceback (most recent call last): File "./test2.py", line 43, in <module> pt.ping_scanx() File "./test2.py", line 39, in ping_scanx par = Parallel(function=self.pingx, parameter_list=list, thread_limit=10) File "./test2.py", line 19, in __init__ self._x = self._pool.starmap(function, parameter_list, chunksize=1) File "/usr/local/lib/python3.7