Skip to main content
1 of 3
Geek
  • 5.2k
  • 8
  • 43
  • 59

Conceptually what does it mean when it is said that each thread gets its own stack?

I have been reading [Java Concurrency in Practice by Brian Goetz][1] and inside the section Stack Confinement it is mentioned that each thread gets its own stack and so local variables are intrinsically confined to the executing thread; the exist on the executing threads stack , which is not accessible to other threads. What does he mean that each thread has its own execution stack ?

Geek
  • 5.2k
  • 8
  • 43
  • 59