• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when does a new call stack is created in Threads?

 
Namit Puri
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When does a new thread of execution starts(with a new call stack)?
a) when the start() method is invoked //refer pg 681 k&b
b) when the run() method is invoked // refer pg 676 k&b

Thanks!
 
Satish Kota
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when a thread's start method is is called the thread is moved from Alive to runnable state, with a new stack allocated to it.
 
Sanjeev Singh
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a) when the start() method is invoked
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic