Questions tagged [autoflush]
34 questions
69
votes
2 answers
Update Command-line Output, i.e. for Progress
I'd like to be able to show a progress meter in a simple PHP script on the command line. Instead of seeing
Progress: 0%
Progress: 1%
etc...
I'd like just the number to change, and replace the previous number, much like git clone does for example…

Adam
- 5,091
- 5
- 32
- 49
38
votes
5 answers
Can you force flush output in Perl?
I have the following two lines in Perl:
print "Warning: this will overwrite existing files. Continue? [y/N]: \n";
my $input = ;
The problem is that the print line does not get executed before the Perl script pauses for input. That is, the…

John
- 3,400
- 3
- 31
- 47
17
votes
3 answers
Is there a guarantee of stdout auto-flush before exit? How does it work?
Here is the code (valid C and C++)
#include
int main() {
printf("asfd");
// LINE 1
return 0;
}
If in line 1 I put segfaulting expression the program would just crash without printing anything (as expected).
But why is the…

sasha.sochka
- 14,395
- 10
- 44
- 68
7
votes
1 answer
Django test database not auto-flushing
I have a bunch of unit test files, all of which consist of django.test.TestCase classes.
Wrote myself a little shell script to uncomment/comment test file imports in my __init__.py file, so I can run tests from certain test files, based off the…

pleasedesktop
- 1,395
- 3
- 14
- 25
6
votes
4 answers
How can I autoflush a Perl 6 filehande?
There are a couple of answers for Perl 6 back in its Parrot days and they don't seem to work currently:
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
implementing Perl 6.c.
The answer to Does perl6 enable…

brian d foy
- 129,424
- 31
- 207
- 592
5
votes
2 answers
perl6/rakudo: Does perl6 enable "autoflush" by default?
#!perl6
use v6;
my $message = "\nHello!\n\nSleep\nTest\n\n";
my @a = $message.split( '' );
for @a {
sleep 0.3;
.print;
}
Does perl6 enable "autoflush" by default. With perl5 without enabling "outflush" I don't get this behavior.

sid_com
- 24,137
- 26
- 96
- 187
5
votes
1 answer
High memory utilization due to autoflushing log
Is it possible to have high memory utilization if autoflush_log is set to true?
I have a custom production environment(staging) setup like this
require Rails.root.join("config/environments/production")
Calamus::Application.configure do
…

usha
- 28,973
- 5
- 72
- 93
5
votes
3 answers
What does autoflush do in socket? why do we use it?
I am working on some socket code and unable to figure out why there is autoflush used on socket. It is something like this
my $sock = IO::Socket::Unix(Peer => $socketfilename , Type => SOCK_STREAM)
autoflush $sock 1;
Also there are places…
user966588
4
votes
2 answers
perl6/rakudo: How could I disable autoflush?
I tried this, but it didn't work:
$*OUT.autoflush( 0 );

sid_com
- 24,137
- 26
- 96
- 187
3
votes
3 answers
Why aren't buffers auto-flushed by default?
I recently had the privilege of setting $| = 1; inside my Perl script to help it talk faster with another application across a pipe.
I'm curious as to why this is not the default setting. In other words, what do I lose out on if my buffer gets…

Zaid
- 36,680
- 16
- 86
- 155
2
votes
2 answers
Java: How to configure System.out to have autoflush enabled?
I used reflection like so to print out the properties of the System.out object:
System.out.println("Class: " + System.out.getClass().getName());
for (Field field : ObjectUtils.getAllFields(System.out)) {
field.setAccessible(true);
…

Dasmowenator
- 5,505
- 5
- 36
- 50
2
votes
1 answer
Why is Grails Searchable Plugin causing errors on Hibernate AutoFlush?
In the Grails 1.2.5 project that I am trying to troubleshoot, we use the Grails Searchable plugin .5.5.1.
The problem is that whenever we attempt to index large sets domain classes, Grails keeps throwing:
ERROR hibernate.AssertionFailure - an
…

Mark Rogers
- 96,497
- 18
- 85
- 138
2
votes
2 answers
System.out.print output to console seen immediately. So PrintStream flushes after each print, not only println?
From the PrintStream documentation:
Optionally, a PrintStream can be created so as to flush automatically;
this means that the flush method is automatically invoked after a byte
array is written, one of the println methods is invoked, or a…

LrnBoy
- 373
- 1
- 2
- 9
2
votes
1 answer
Hibernate does create new entry instead of update (not always)
I am facing the problem, that my DAO tries to save an existing object again, instead of update. (it creates a new one)
This happens with the hibernateTemplate saveOrUpdate- and merge-method. The passed object always contains an ID (PK, auto…

Tunguska
- 1,205
- 3
- 18
- 37
2
votes
1 answer
When should you disable JSP buffering?
Some documentation on Oracle's website (http://docs.oracle.com/cd/A97688_16/generic.903/bp/j2ee.htm, 3.1.12 Disable JSP Page Buffer If Not Used) says:
If you are not using any JSP features that require buffering, you can disable it to improve…

Nick Williams
- 2,864
- 5
- 29
- 43