Tips on effectively using Multithreading to improve the efficiency of my programs In multiple processor systems, a large algorithm will split the process into threads. So that different processors can handle different threads. Multithreading can greatly help the external lookups like JDBC connections, serializing the objects, persisting data in file streams and so on. While the code waits for the data from the database, the CPU would be free and can handle other task. With multiprocessor systems, these tasks are multiplied as there are multiple processors. Thus multiple threads improve the program / application efficiency.
|