Multithreading is the ability of a central processing unit to execute multiple processes or threads concurrently, supported by the operating system.
Safety issues: Without proper synchronization a program where the order of execution is important can cause unexpected results with multiple threads.
Multi-threading is best used for situations where you have a lot of asynchronous functions which can work on independent data coupled with long wait states.
Using multiple threads have improved a lot the speed, simply because non-dependant tasks can be done simultaneously.
Comments