Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: Good place to learn about `multiprocessing.Manager`? [closed]

I want to learn to use multiprocessing.Manager. I looked at the documentation but it's not easy enough for me. Anyone knows of a good tutorial or something like that?

like image 408
Ram Rachum Avatar asked Apr 11 '09 21:04

Ram Rachum


People also ask

How do you close a multiprocessing process in Python?

We can kill or terminate a process immediately by using the terminate() method. We will use this method to terminate the child process, which has been created with the help of function, immediately before completing its execution.

What is multiprocessing manager Python?

multiprocessing is a package that supports spawning processes using an API similar to the threading module.

Is multiprocessing part of Python?

The Python Multiprocessing Module is a tool for you to increase your scripts' efficiency by allocating tasks to different processes.

How does Python multiprocess work?

The multiprocessing Python module contains two classes capable of handling tasks. The Process class sends each task to a different processor, and the Pool class sends sets of tasks to different processors.


1 Answers

The documentation of multiprocessing.Manager contains extensive examples for using a Manager and the various objects associated with the calss:

Managers provide a way to create data which can be shared between different processes. A manager object controls a server process which manages shared objects. Other processes can access the shared objects by using proxies. [and so on]

Manager objects allow you to create variables shared in multiple processes. What is it that you exactly want to achieve? Maybe a request for an example would help?

like image 52
Manuel Avatar answered Sep 20 '22 18:09

Manuel