Boost logo

Boost Users :

From: James Hughes (JHughes_at_[hidden])
Date: 2006-04-10 11:59:09


> -----Original Message-----
> From: me22 [mailto:me22.ca_at_[hidden]]
> Sent: 10 April 2006 16:24
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Delayed write file handling
>
>
> On 4/10/06, James Hughes <JHughes_at_[hidden]> wrote:
> > My question is this - does Boost provide anything that does
> this already (or
> > does anyone know of anything that does), or am I looking at
> this the wrong
> > way? Should I look at boost filesystem, and provide extra
> bits to implement
> > what we need? Alternatives?
> >
>
> I'm not certain that you need Boost for this.
>
> streambufs are already designed to buffer information, so simply
> providing a large enough buffer for the amount of information
> generated on average in the time span you wish between writes ought to
> limit writes enough for your application.
>
> The main issue I foresee would be insuring that std::endl isn't used
> when you don't want the flush and insuring that the implementations of
> your streambufs actually use the buffer as you're expecting.
>
> ~ SWMc

I can see what you are getting at, but I am not sure that it would give us
everything we need.

For example, if our machine power fails, we have very limited amount of
battery backup to store everything cached to flash before we run out of
watts, so whatever scheme I implement needs to be able to be told to flush
immediately - can I do that with streambufs?

Hmm. I will look in to it though, as I like the concept.

James


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net