How soon after calling start() will the run() method be executed?

Christopher Schultz

Your run() method is not guarenteed to run immediately after the Thread.start() method is called.

The Java Language Specification gives implementations lots of legroom with respect to the scheduling of threads. Your thread may start immediately, or it may start 5 minutes later.

Any decent implementation will have your thread start as soon as possible under the scheduling algorithm, so a five minute wait would be unreasonable.

-chris
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact