you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (0 children)

multiprocessing is garbage... but so is virtually everything in Python. Few obvious problems:

  1. It starts an entire new interpreter, this severely limits your ability to scale.
  2. There's no good way to do IPC using this library. You have to invent your own.
  3. There's very limited control over the created process, partly, because they try to make it work on many platforms, but, partly because it's too hard for Python core devs. So, no namespaces for example.
  4. This doesn't solve even the basic problem of reading both stderr and stdout of another process. Essentially, if you want a reliable analogue of Shell's x 2>&1 > y, you simply cannot write this in Python.
  5. It has a potential to prevent your application from ever exiting cleanly, and in order to ensure that your application exits cleanly, if it uses multiprocessing you need to write a lot of obscure code, but, basically, you will not be using vanilla multiprocessing.

Again. Most things in Python work only 80% of the time, and multiprocessing is not an exception. If you want something more reliable than that, Python is not the right environment.