[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Flushing all Buffers Before Exiting



On Thu, Mar 21, 2019 at 07:52:33PM -0500, Martin McCormick wrote:

[...]

> 	Opening, appending and closing for each new line of
> output made me a bit squeamish.  The program is monitoring a
> stream of data from a radio scanner.  The data spew in at about
> 20 or 30 lines per second.

Don't fear. Measure :-)

Doesn't sound outrageous to line-buffer your output to file.

The output to screen is already line-buffered (by default,
at least) and isn't killing you, so if I were you, I'd set
up a benchmark run and torture things a bit. Then, *if* you
notice any whiff of a problem, you could try a more clever
scheme like timeout based flush to better get hold of bursts
(if I understood your description, things go out in bursts).

Cheers
-- tomás

Attachment: signature.asc
Description: Digital signature


Reply to: