Python Forum

Full Version: sharing variables between two processes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.