Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is meant by Blocking I/O ?

 
arul senthil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can anyone tell me what is meant by "blocking i/o" operation?
What is a "non-blocking i/o" ? Pls explain them in terms of Threads.
Thanks,
Senthil.
 
Kezia Matthews
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I/O operations are considered to be blocking operations for thread execution. This means that, when a thread starts performing I/O, (which would include a series of operations in itself, like opening file, reading, writing, closing of files, etc), it prevents the thread from performing any other operation, till the I/O is over. Hence I/O is called a blocking operation as far as threads are concerned.
There is nothing like non-blocking I/O.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kezia Matthews:
There is nothing like non-blocking I/O.

Actually, in J2SDK v1.4, currently in beta, there is (java.nio.*).
- Peter

 
Kezia Matthews
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks Peter, for letting me know about the existence of "non-blocking I/O" in the new version, J2SDK v1.4.
Kezia.
 
arul senthil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
There is some more info about NBIO here : http://www.jguru.com/forums/view.jsp?EID=468022
-Senthil.
 
Kezia Matthews
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks Arul.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!