GeeCON Prague 2014*
The moose likes Threads and Synchronization and the fly likes MULTI-THREADING Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "MULTI-THREADING" Watch "MULTI-THREADING" New topic
Author

MULTI-THREADING

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
why we are going for
threading concepts?
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
I think your question is "Why use threads"
First let us define a thread which is
A thread is a single sequential flow of control within a program.
Many a times in programs we undertake a tasks which block user input. The program and the User Interface thus get locked up in undertaking these tasks. The user is thus unable to do anything else till these activities are over.
This locking up behaviour is basically when
Huge processing is being undertaken
I/O operations are being undertaken like reading a file or writing to a file
The system is trying to access a network resource
thus if you try to access the contents of your floppy drive you will be able to do nothing else till this activity is over.
Threads are a way around this problem. They allow one to hive off these type of activities to another execution path while the current execution path is still free to do some other work.
For more information of threads visit the Sun Tutorial on threads at
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
Regds.
Rahul
 
GeeCON Prague 2014
 
subject: MULTI-THREADING