Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multithreading and concurrency

 
Pankaj Shet
Ranch Hand
Posts: 293
Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am Pankaj Shet.
I want to know the difference between multithreading and concurrency.
Where can I apply them?
Thank You
 
Matt Russell
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pankaj,

Threads are a specific example of concurrency.

"Concurrency occurs when two or more execution flows are able to run simultaneously."

Threads are a way for programs to do several different tasks at the same time -- that is, concurrently. (They're not the only mechanism; another is to use several "processes").

The following is a good page to read to understand situations where you could apply multithreading:
http://www.oreilly.com/catalog/jthreads2/chapter/ch01.html#41042
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic