Python Forum
sharing variables between two processes - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: sharing variables between two processes (/thread-30805.html)



sharing variables between two processes - Kiyoshi767 - Nov-07-2020

Hi, I have a bit of code that I need to run in parallel to another code. In this code I need to update two variables so both processes can read and update, with the use of locks from threading module. I cannot figure out how to share variables between these two processes. Can someone tell me how?


RE: sharing variables between two processes - ndc85430 - Nov-07-2020

Say more about what you're trying to do. Why exactly is there a need to share mutable state? Id you can avoid it, you can avoid having to lock.