S
S
Space Around2020-10-11 11:16:40
Python
Space Around, 2020-10-11 11:16:40

Why is the channel closing in multiprocessing?

I use multiprocessing in python, I run the program, it does everything necessary and ends with this error:

Traceback (most recent call last):
  File ".\src\controller.py", line 139, in <module>
    main()
  File ".\src\controller.py", line 128, in main
    r2.send({"action": "add_items_con"})
  File "C:\Users\Kulic\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "C:\Users\Kulic\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] Идет закрытие канала

  1. If a similar error pops up after the program ends, this is critical.
  2. What could be the reason for such an error?
  3. What are the options for solving it? The documentation on this subject did not say anything, I also read that a similar error is associated with a lack of RAM, but I strongly doubt that 4GB of RAM is not enough to run only two processes, this is the parent and child

I also found this in the documentation :

Close the Process object, releasing all resources associated with it. ValueError is raised if the underlying process is still running. Once close() returns successfully, most other methods and attributes of the Process object will raise ValueError.

maybe it's normal that this error is displayed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question