python使用多进程报错TypeError: cannot serialize '_io.TextIOWrapper' object

报错:

TypeError: cannot serialize '_io.TextIOWrapper' object

原因:

由于我想把socket连接传递给另一个进程就报了这个错误,多进程之间不可以传递这种东西。

// socket连接只能在线程间传递使用。