Thread: Blocking Read, what is it?

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    34

    Blocking Read, what is it?

    I have come across the term blocking read, but I don't know what it means. I've tried googling but can't find an answer.

    I'm guessing it means read from a stream in blocks rather than in lines or characters.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    27
    No you are wrong, keep googling

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Basically, it's a read operation that waits for input (or at least first sees if the input buffer/stream has data to process and does so) and returns only when data has been processed. A non-blocking read will get whatever happens to be in said input buffer/stream and immediately returns (even if there is nothing at all to be processed).

    Consider: Asynchronous I/O - Wikipedia, the free encyclopedia
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Weird read input or bad printf output?
    By ChaoticMachiner in forum C Programming
    Replies: 3
    Last Post: 05-04-2008, 03:40 PM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. I am lost on how to read from file and output to file?
    By vicvic2477 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2005, 11:52 AM
  4. Read Array pro!!Plz help!!
    By Supra in forum C Programming
    Replies: 2
    Last Post: 03-04-2002, 03:49 PM
  5. Help! Can't read decimal number
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 09-07-2001, 02:09 AM