What are the advantages and disadvantages of threads?
Answer
Advantages and disadvantages of threads
Answer
Advantages and disadvantages of threads
- With more threads, the code becomes difficult to debug and maintain.
- Thread creation puts a load on the system in terms of memory and CPU resources.
- We need to do exception handling inside the worker method as any unhandled exceptions can result in the program crashing.