|
Re: handling disk IO within asio programs: msg#00002lib.boost.asio.user
Hi Jose, Jose <jmalv04-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: > Can you provide a code snippet on how to handle disk IO within > asio (using threads) given that asio does not support asynch > disk IO ? The "services" example included with asio does half of what you want -- it uses a background thread to perform logging operations asynchronously to the main thread. The missing element in that example is posting the completion handler back to the application. You might also look at the implementation of the resolver_service in asio/detail/resolver_service.hpp, since that uses a background thread to emulate asynchronous hostname resolution. 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> |
|---|---|---|
| Previous by Date: | Re: undelivered handlers: 00002, Christopher Kohlhoff |
|---|---|
| Next by Date: | Re: handling disk IO within asio programs: 00002, Jose |
| Previous by Thread: | Re: undelivered handlersi: 00002, Christopher Kohlhoff |
| Next by Thread: | Re: handling disk IO within asio programs: 00002, Jose |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |