Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MULTI-THREADING

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why we are going for
threading concepts?
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic