-2

I've been looking at multithreading in Java, however the only use of multithreading I can see is for servers when dealing with clients in their own thread.

Can someone give more examples of uses of multithreading that would be practical in most situation, please?

Heat Death
  • 105
  • 9

1 Answers1

0

You can use a multithreaded elaboration every time that a job can be splitted into sub-activities that are among them indipendent. Sorting an array is an example: Correctly multithreaded quicksort or mergesort algo in Java?.

You can view the concept of indipendence from an order point of view: two action are independent if and only if their order of execution is not important. Reactive programming takes this idea to the next level. Responsivness of an application is mainly based on this concept of indipendence.

Community
  • 1
  • 1
riccardo.cardin
  • 7,971
  • 5
  • 57
  • 106