Why not using multiprocessing.Manager().dict() ?
See original GitHub issueHello,
it would be nice if the README would describe the reason for this project.
As there is already multiprocessing.Manager().dict()
in the stdlib which does the same?!
Is this significantly easier or faster than the multiprocessing library?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Manager dict in Multiprocessing - python - Stack Overflow
@crysis405 I fixed that. Looks like manager's dict is not fully dumped while transfering between processes, so we need to replace original value ......
Read more >multiprocessing — Process-based parallelism — Python 3.11 ...
A manager object returned by Manager() controls a server process which holds Python objects and allows other processes to manipulate them using proxies....
Read more >Cannot modify dictionaries inside dictionaries using Managers ...
It's not possible to modify a dict inside a dict using a manager from multiprocessing. ... The output is the same if you...
Read more >Question about multiprocessing.Manager().dict() : r/learnpython
For those unfamiliar, multiprocessing.Manager is a class that wraps a mutex around specific objects you want to share and transfers them between ...
Read more >Python multiprocessing.Manager() Examples
This page shows Python examples of multiprocessing.Manager. ... def test_init(): manager = Manager() return_dict = manager.dict() # make server init before ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @spaceone thanks for the comment.
We create this project to provide an alternative for distributed cache servers (like Redis) for some ephemeral data that we can share between our gunicorn/uwsgi workers across some k8s pods, but still in the experimental stage.
About
multiprocessing.Manager().dict()
, according to python docs:And (IMO)
multiprocessing.shared_memory
it’s easier to use in our scenariosDid you already use
multiprocessing.Manager().dict()
across gunicorn/uWSIG workers? I’d love to see some examples and perform some benchmarks.btw. I expected
multiprocessing.Manager().dict()
to be shared memory, but it seems it creates a UNIX socket and runs a server in a thread. I can’t give you any benchmarks as I don’t work with gunicorn/uWSGI.