Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

thread inconsistency  RSS feed

 
praveen Shangunathan
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading about threads I came across the guarentee about NO-guarentee about the order/when they run etc.,
why is this?
because there is scheduling involved, i understand there are other factors than just the version of JVM.
in that case, shouldnt threads work, consistently for a given JVM and a given OS.

pls advice.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically threads do work somewhat consistently on a given JVM, on a given OS. Though the behavior can still vary because of other factors, such as what hardware is being used, and what other processes are running on the machine at the same time. But the specs for threads are written to carefully avoid many guarantees, because the specifications try to be independant of things like OS and hardware. Does that answer your question?
 
praveen Shangunathan
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so if i understand it right, because threads depends a lot on resources outside of jvm like os, hardware etc., the makers of java played it safe by not wanting to give a guarentee on certain isssues.

thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!