Questions tagged [flush]

Flush means clearing all the buffers for a stream. This will cause any buffered data to be written to the underlying device.

Flush means clearing all the buffers for a stream. This will cause any buffered data to be written to the underlying device.

1132 questions
10
votes
3 answers

Is there a way to check whether the processor cache has been flushed recently?

On i386 linux. Preferably in c/(c/posix std libs)/proc if possible. If not is there any piece of assembly or third party library that can do this? Edit: I'm trying to develop test whether a kernel module clear a cache line or the whole…
Roman A. Taycher
  • 18,619
  • 19
  • 86
  • 141
10
votes
3 answers

What exactly is flushing?

I'm brand new to coding and programming (started today actually). I've been watching a few videos and reading the beginning to a few books to see which I can click with, but I'm having trouble understanding some of it. One of the videos utilized…
B Mai
  • 101
  • 1
  • 3
10
votes
1 answer

Using Kafka Connect HOWTO "commit offsets" as soon as a "put" is completed in SinkTask

I am using Kafka Connect to get messages from a Kafka Broker (v0.10.2) and then sync it to a downstream service. Currently, I have code in SinkTask#put that will process the SinkRecord & then persist it to the downstream service. A couple of key…
Chantz
  • 5,883
  • 10
  • 56
  • 79
10
votes
2 answers

std::endl crashes Windows 8, compiled using MinGW

I have 3 computers, two of which use Windows 8. Using the latest version of MinGW's g++ (4.8.1-4) my hello world program freezes whenever I compile and run on the Windows 8 computers but not in Windows 7. #include int main() { …
user1276560
  • 135
  • 1
  • 6
10
votes
3 answers

Why does using std::endl with ostringstream affect output speed?

I'm timing the difference between various ways to print text to standard output. I'm testing cout, printf, and ostringstream using both \n and std::endl. I expected std::endl to make a difference with cout (and it did), but I didn't expect it to…
gsgx
  • 12,020
  • 25
  • 98
  • 149
10
votes
5 answers

How to empty/flush Windows READ disk cache in C#?

If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn't give an accurate read speed because Windows does disk read caching. Is there a…
Pretzel
  • 8,141
  • 16
  • 59
  • 84
9
votes
3 answers

How do I use the unofficial Android Market API?

I'm trying the sample code from here. But my app is crashing. I added logging and found out that it's crashing at session.flush(); so I removed that line and it doesn't crash anymore. But it doesn't reach the onResult callback. package…
mrburns
  • 453
  • 1
  • 8
  • 17
9
votes
2 answers

NHibernate: is it valid to call Session.Flush() before committing a transaction?

I need to execute two operations inside a NHibernate's unit of work: a transactional one (an entity saving) and a not-transactional one. Since the not-transactional operation cannot be rollbacked, if I save the entity before executing the…
Notoriousxl
  • 1,540
  • 1
  • 16
  • 27
9
votes
1 answer

ffmpeg: flushing output file every chunk

I'm using ffmpeg to generate a sine tone in real time for 10 seconds. Unfortunately, ffmpeg seems to flush the output file only rarely, every few seconds. I'd like it to flush every 2048 bytes (=2bytes sample width*1024 samples, my custom chunk…
2080
  • 1,223
  • 1
  • 14
  • 37
9
votes
1 answer

Python's print function that flushes the buffer when it's called?

I have the following code to flushing out the output buffer. print('return 1') sys.stdout.flush() Can I set up the print function so that it automatically flushes the buffer when it's called?
prosseek
  • 182,215
  • 215
  • 566
  • 871
9
votes
2 answers

Is there a way to do on demand flushing of WCF trace?

Just like there is a command to flush IIS7 logs: netsh http flush logbuffer I'm wondering is there a similar command to flush WCF trace log on demand.
Piotr Owsiak
  • 6,081
  • 8
  • 39
  • 42
9
votes
2 answers

Will StreamWriter.Flush() also call FileStream.Flush()?

I have a StreamWriter which underlying stream is a FileStream. Will the following code guarantee that the FileStream also flushes its buffer into the actual file on the file system, or do I need to explicitly call Flush() on the FileStream? using…
Erwin Mayer
  • 18,076
  • 9
  • 88
  • 126
9
votes
1 answer

Adding Cookie after FilterChain.doFilter() - HttpServletResponseWrapper to ignore flushing?

I'd like to add a cookie to an HttpServletResponse after its content (usually HTML) has been rendered. As mentioned here (http://osdir.com/ml/java.jasig.uportal/2005-10/msg00276.html), and here (Adding a cookie to the response in Java after the…
bloodcell
  • 601
  • 1
  • 9
  • 23
8
votes
7 answers

C# or .NET Flushing Keyboard Buffer

How do I flush the keyboard buffer in C# using Windows Forms? I have a barcode scanner which acts like a keyboard. If a really long barcode is scanned and the cancel button is hit on the form, I need the keyboard buffer to be cleared. So I need to…
Amar Premsaran Patel
  • 1,293
  • 7
  • 17
  • 26
8
votes
2 answers

How do I implement an HTTP Response Filter to operate on the entire content at once, no chunking

As mentioned in a couple other posts (see References below) I am attempting to create response filters in order to modify content being produced by another web application. I have the basic string transformation logic working and encapsulated into…
Ryan Taylor
  • 8,740
  • 15
  • 65
  • 98