Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multithreading

 
Srinivas Kongara
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How many ways are there to perform MultiThreading?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, kongara srinu!

What do you mean by "how many ways"? What distinguishes one "way" from another in your mind?

Depending on what you mean, the answer could be 1, or it could be 2, or it could be "infinitely many", or it could be some other finite number.

What are you really trying to learn here? What's the purpose behind your question?

Finally, in the future, please UseAMeaningfulSubjectLine(⇐click) so people will know at a glance what you're asking about. Thanks!
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff Verdegan wrote:Depending on what you mean, the answer could be 1, or it could be 2, or it could be "infinitely many", or it could be some other finite number.


And, for any given "way", there are probably ten times as many implementations that are incorrect as there are that work properly, scale, and perform as expected.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reminds me of a joke question I heard once ...

"How long is a piece of string?"

To answer the OP, there are standard Java Threads(), Runnable etc. The new TaskExecuters (I think),
Spring framework has it's own implementation etc..

Use the best implementation for the task (lol) at hand.

WP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic