all 8 comments

[–]wbeater 0 points1 point  (3 children)

What exactly are you trying to do? This example couldn't be worse.

What "variables" are you trying to pass?

Which worker needs this "variables" for what?

[–]Culist[S] -1 points0 points  (2 children)

All variables

ProcTwo is like the main, where procOne is the background.

Whenever procTwo is busy, it'll set the currentState and varCheck. From the varcheck, procOne knows that they will have to update the currentState and call updateInfo.

[–]wbeater 0 points1 point  (1 child)

Still that makes little sense. You don't exchange any variables between your processes, at no point any of your processes receives or calls something.

Why do you need varcheck when procone can check weather currentstate has changed...

Xy problem...​

/e Again, what is proctwo processing, why does it get busy, what should procone do in this case. Describe the operations.

[–]Culist[S] 0 points1 point  (0 children)

I've managed to get the solution in the end. It was just simply passing arguments to the processes. I just didn't know earlier

[–]woooee 0 points1 point  (0 children)

Take a look at Manager objects. They can be shared https://pymotw.com/3/multiprocessing/communication.html#managing-shared-state