Boost logo

Boost :

From: Julio M. Merino Vidal (jmmv84_at_[hidden])
Date: 2006-06-25 15:50:07


On 6/25/06, Jeff Garland <jeff_at_[hidden]> wrote:
>
> 3) I see some major overlap in your plans with Boost.Process. You are
> providing what amounts to a a simplified form of what I what Julio is doing in
> his SOC project. You might have a look at Julio's current design page and
> provide feedback:
>
> https://boost-consulting.com:8443/trac/soc/wiki/process/DesignThoughts
>
> I believe he would treat the various times you are measuring as attributes of
> the process class. So the code would be something like:
>
> bp::cmdline cl("...do something...");
> bp::generic_attributes attrs(cl);
>
> bp::launcher l(attrs);
> bp::child c = l.start();
>
> while (!c.exited()) {
> time_duration wall = attrs.wall;
> time_duration user = attrs.user;
> ...
> };

With the current design, one'd even do something like the following to
measure the run time of the current process (as the original proposal
does if I understood it correctly):

bp::process p = bp::process.self(); // Or something like that; you
get the idea.
bp::attributes a = p.get_attributes();
// Now deal with the time attributes in a.

Cheers,

-- 
Julio M. Merino Vidal <jmmv84_at_[hidden]>
The Julipedia - http://julipedia.blogspot.com/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk