in reply to Re: Sleep Not Sleeping when using without "\n"
in thread Sleep Not Sleeping when using without "\n"

Or just be very, very, patient :)
  • Comment on Re^2: Sleep Not Sleeping when using without "\n"

Replies are listed 'Best First'.
Re^3: Sleep Not Sleeping when using without "\n"
by 5mi11er (Deacon) on Mar 24, 2005 at 15:48 UTC
    From the Suffering from Buffering article, link in comment below, we get the line: "The blocks on your disk are probably about 8K bytes."

    Using that, and your original, non '\n', case, plus the sleep of 1 second, we get:

    8K = 8 * 1024 = 8192 bytes 'test' = 4 bytes 8192/4 = 2048 = # of times output will need to happen before you se +e anything due to buffering. 2048 * 1 second sleeps between each output = 2048 seconds 2048 / 60 seconds per minute = 34.1333 minutes to wait.
    -Scott