File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Is it possible to execute the code by multiple thread simulataneously? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Is it possible to execute the code by multiple thread simulataneously?" Watch "Is it possible to execute the code by multiple thread simulataneously?" New topic
Author

Is it possible to execute the code by multiple thread simulataneously?

azuki ooh
Greenhorn

Joined: Nov 07, 2008
Posts: 20
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3960
    
  17

Is it possible to execute the code by multiple thread simulataneously?

Concurrently? Yes. Simultaneously? That depends on hardware and OS.


Steve
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Also note that for code like that, if the threads are sharing the same instance, then if you don't use proper synchronization, you may get undesirable results. For example, you could have 100 threads executing, and the count could end up at 1, or at 2, or at anything up to and including 100.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to execute the code by multiple thread simulataneously?
 
Similar Threads
String constructors and counting objects
Problem with jsp:getProperty
JPA and static inner class, possible?
Inheritance problem
String constructor