Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basic

 
sudheer singampalli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Java.
plz tell me what a "thread-safe" program means.
 
Amol Takate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In simple words a thresd safe class or object means there is only one thread inside a object at a given point in a time.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amol --
No, not really, that isn't what it means.
"Thread-safe" means quite the opposite, really: it means that multiple threads can access a single resource simultaneously without harm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic