django多线程报错
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\xxhaa\AppData\Local\Programs\Python\Python310\lib\multiprocessing\spawn.py", line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File "C:\Users\xxhaa\AppData\Local\Programs\Python\Python310\lib\multiprocessing\reduction.py", line 79, in duplicate
return _winapi.DuplicateHandle(
OSError: [WinError 6] 句柄无效。
django 运行多线程
代码如下
multiprocessing.Process(target = readportsendwebsocket,args = (portobj,)).start()
将其改为多线程后无法启动多线程