logo       

Re: handling disk IO within asio programs: msg#00008

lib.boost.asio.user

Subject: Re: handling disk IO within asio programs


Jose <jmalv04-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
> By "completed write" I meant file, so it would be analogous
> to the resolver_service that uses one thread for every dns
> query.

Actually there's one thread for the whole resolver_service, and
the resolve operations just get queued. But yeah, a thread per
file might be ok.

> Regarding your services example, you mentioned before: "The
> missing element in that example is posting the completion
> handler back to the application."
>
> Why should I post the completion handler back ?

If you want to pass back an error code indicating whether the
operation was successful or not, or pass back the number of
bytes written or read.

> And why don't you post the completion handler back in your
> services example?

Dunno, I guess I just didn't really feel the need for it, since
programs don't normally check whether logging calls succeeded or
not.

Cheers,
Chris




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise