On Sun, Oct 20, 2013 at 8:27 PM, brainman wrote: On Saturday, 19 October 2013 04:37:19 UTC+11, Tong Sun wrote:
- Do you agree that "In Go neither os.Stdout nor os.Stderr is buffered"?
I'am not sure. But I would say yes.
- Have you tried Péter's example, http://play.golang.org/p/ENdvg6u37m?
I did now. It prints:
C:\>go run a.go
What is your point?
The point is not what it prints but how it prints. It clearly shows
".") should take effect immediately, not sometime later.
I did. I run your http://play.golang.org/p/HX0G79dvV9
BigTable, instead of sys.databases.
... Then we should see the dots progressing. However, you will find, in
this simple example, the dots all show up at once after the lengthy process
finished, not one by one during it. I.e., "nothing" then all-of-sudden
Yes, I see all dots are printed at once. But why shouldn't they? Please
As said before, the mt.Fprintf(os.Stderr, ".") should take effect
immediately, not sometime later.
My above program prints a dot for every it record outputs. So if it takes
10 seconds to run for 10 records, then dots should be printed about 1
second at time, not all at once at the end, right? If it happens too fast
to you, please run the second SQL statement 10~20 times more to make it
And whatever reason it happens, it is not because of "os.Stderr is
buffered". I think that "os.Stderr is buffered" is red herring here. I
would look for a different explanation instead.
Agree. but the above result, observing from an end user prospective, shows
the symptom of Stderr being buffered to the end, which was my initial
guess. And if you have following the entire thread, you would know that I
was trying to come up with all different explanations and have written
small code to test whether they are correct or not. Just so far all my
other guessings have been proving wrong.
That's so much I can do from an end user prospective, trying to guess
what's happening in the black box.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.