custom async devices

Recently I had a question about how I could use asio for performing asynchroneous file IO. In the meantime I found that there are already some classes for doing async_read_at IO on handles, but only for windows. Since I need to address multiple platforms I am wondering how I would go about that. I am thinking of an emulation layer in user-space based on threads. I guess I could set up a thread-pool that will accept async call ins. The thread pool would know about an io_service and when a task, e.g. a file IO has completed, use the post function on the io_service to invoke the completion handler. Is this a reasonable design? Any pros/cons? Does anyone know of an example that I could use as a starter? Thank you, Roland -- _________________________________________ _ _ | Roland Schwarz aka. speedsnail |_)(_ | sip:speedsnail@ekiga.net | \__) | mailto:roland.schwarz@chello.at ________| http://www.blackspace.at
participants (1)
-
Roland Schwarz