Advantages and Disadvantages of threads

Advantages of threads

  1. We can execute multiple tasks of an application at a time
  2. Reduces the complexity of a big applications
  3. Helps to improve the performance of an application drastically
  4. Utilizes the max resources of multiprocessor systems
  5. Better user interface in case of GUI based applications
  6. Reduces the development time of an application
  7. All the threads are independent , any unexpected exception happens in any of the thread will not lead to an application exit.

Disadvantages of threads

  1. Thread synchronization is an extra over head to the developers
  2. Shares the common data across the threads might cause the data inconsistency or thread sync issues
  3. Threads blocking for resources is more common problem
  4. Difficult in managing the code in terms of debugging or writing the code