Skip to content

Process vs Thread

Try it yourself

Two workers, three additions each. The memory decides the answer

TWO PROCESSEScode + globalsheapcount = 0stackworker AProcess Acode + globalsheapcount = 0stackworker BProcess BONE PROCESS, TWO THREADScode + globalsheapstackthread 1stackthread 2One process
count = 0one counter each, in separate memory
0 of 6 additions

Watch the animation