Python Forum
sharing variables between two processes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sharing variables between two processes
#1
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?
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to secure API key when sharing quarinteen 2 350 Jan-19-2024, 04:46 PM
Last Post: deanhystad
  processes shall be parallel flash77 4 1,123 Sep-20-2022, 11:46 AM
Last Post: DeaD_EyE
  Sharing imported modules with Sub Processes? Stubblemonster 2 1,512 May-02-2022, 06:42 AM
Last Post: Stubblemonster
  How to install modules for 2.7 (or sharing from 3.8)) Persisto 2 2,455 Dec-31-2021, 02:33 PM
Last Post: Persisto
  Killing processes via python Lavina 2 2,633 Aug-04-2021, 06:20 AM
Last Post: warnerarc
  multiprocessing and sharing object cyrduf 0 2,057 Feb-02-2021, 08:16 PM
Last Post: cyrduf
  How to share a numpy array between 2 processes on Windows? qstdy 0 2,170 Jan-29-2021, 04:24 AM
Last Post: qstdy
  Sharing my code emirasal 2 2,048 Oct-04-2020, 02:21 PM
Last Post: emirasal
  2 or more processes on the write end of the same pipe Skaperen 4 3,886 Sep-27-2020, 06:41 PM
Last Post: Skaperen
  Sharing X Axis in Sub plots JoeDainton123 1 2,189 Aug-22-2020, 04:11 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020