Summary: By the end of this tutorial "Multithreading Realtime Examples", you will come to know the realtime applications of multithreading.
Generally you will be eating dinner while watching TV. At the same time, you may be talking to your mother to get some more eatables. Now, you are doing three different tasks in parallel. This we call in computers as multitasking achieved through multithreading.
To achieve multiple tasks parallel, Programmer uses threads. Multithreading gives Java the ability to achieve multiple tasks in parallel. One task does not wait for another to complete. That is, without completing one task, another task can start and also can execute.
Multithreading Realtime Examples
- Background jobs like running application servers like Oracle application server, Web servers like Tomcat ctc which will come into action whenever a request comes.
- Performing some execution while I/O blocked.
- Gathering information from different web services running in parallel.
- Typing MS Word document while listening to music.
- Games are very good examples of threading. You can use multiple objects in games like cars, motor bikes, animals, people etc. All these objects are nothing but just threads that run your game application.
- Railway ticket reservation system where multiple customers accessing the server.
- Multiple account holders accessing their accounts simultaneously on the server. When you insert a ATM card, it starts a thread for perform your operations.
- Servlets are multithreaded.