How can I change a variable from one process to another if the two processes are on different machines?

I’m not an expert on this, but I’ll respond because nobody else has taken it.

A worked out example of distributed computing can be found here:

For your first question, it sounds like you are looking for a SharedArray.
For the second, to prevent a race condition you would use a lock (pointer in the above thread). But I may misunderstand what you are asking for in your last paragraph.

1 Like