
Hello Boris, I tried the Process library with msvc .net 2008 (vc9) sp1 on win XP sp3. However, the example async_io.cpp does not work properly. The function end_read does not be called at all neither in debug nor in release mode. I looked into the asio implementation but got lost by the details which I haven't mastered.
It would be nice if you could write:
bp::child c = start_child(); bp::pistream &is = c.get_stdout(); is.async_read_some(...);
Yes, please.
The first question is then where to pass the io_service instance to Boost.Process? In Boost.Asio I/O objects are typically initialized with io_service. As both child and pistream are created in the library io_service would need to be passed to Boost.Process when the child is spawned. However developers who don't want to use asynchronous I/O really shouldn't create an io_service instance first.
Maybe not an asio service object but a lightweight wrapper of the object. I would hide the usage of asio from the Process interface.
Another idea is of course adding a new class to Boost.Process (pistream would then only be used for synchronous I/O)? Right now I'd probably go this way? Fine.
With best regards Johannes