This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes basic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "basic " Watch "basic " New topic


sudheer singampalli

Joined: Nov 03, 2003
Posts: 4
I am new to Java.
plz tell me what a "thread-safe" program means.
Amol Takate

Joined: Sep 20, 2003
Posts: 15
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

Joined: Jul 08, 2003
Posts: 24187

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.

[Jess in Action][AskingGoodQuestions]
GeeCON Prague 2014
subject: basic