Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class group

boost::process::group

Synopsis

// In header: <boost/process/group.hpp>


class group {
public:
  // types
  typedef             ;   
  typedef  ;  // Native representation of the handle. 

  // construct/copy/destruct
  ();
  ();
  (group &) = ;
  (group &&);
  () = ;
  group & (group &) = ;
  group & (group &&);
  ~();

  // public member functions
   ();
   ();
   ();
   () ;
   ();
   () ;
  template<typename Rep, typename Period> 
     ();
  template<typename Rep, typename Period> 
     (, 
                  ) ;
  template<typename Clock, typename Duration> 
     ();
  template<typename Clock, typename Duration> 
     (, 
                    ) ;
   () ;
  () ;
   ();
   () ;
   (child &);
   (child &, ) ;
   (child &);
   (child &, ) ;
};

Description

Represents a process group.

Groups are movable but non-copyable. The destructor automatically closes handles to the group process.

The group will have the same interface as std::thread.

[Note] Note

If the destructor is called without a previous detach or wait, the group will be terminated.

[Note] Note

If a default-constructed group is used before being used in a process launch, the behaviour is undefined.

[Note] Note

Waiting for groups is currently broken on windows and will most likely result in a dead-lock.

group public construct/copy/destruct

  1. ( ch);
  2. ( handle);
    Construct the group from a native_handle.
  3. (group &) = ;
  4. (group && lhs);
    Move constructor.
  5. () = ;
    Default constructor.
  6. group & (group &) = ;
  7. group & (group && lhs);
    Move assign.
  8. ~();

    Destructor

    [Note] Note

    If the destructor is called without a previous detach or wait, the group will be terminated.

group public member functions

  1.  ();
    Detach the group.
  2.  ();

    Join the child. This just calls wait, but that way the naming is similar to std::thread

  3.  ();

    Check if the child is joinable.

  4.  () ;
    Obtain the native handle of the group.
  5.  ();
    Wait for the process group to exit.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  6.  ( ec) ;
  7. template<typename Rep, typename Period> 
       ( rel_time);

    Wait for the process group to exit for period of time. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Returns:

    True if all child processes exited while waiting.

  8. template<typename Rep, typename Period> 
       ( rel_time, 
                     ec) ;
  9. template<typename Clock, typename Duration> 
       ( timeout_time);

    Wait for the process group to exit until a point in time. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Returns:

    True if all child processes exited while waiting.

  10. template<typename Clock, typename Duration> 
       ( timeout_time, 
                       ec) ;
  11.  () ;
    Check if the group has a valid handle.
  12. () ;
    Convenience to call valid.
  13.  ();
    Terminate the process group, i.e. all processes in the group.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  14.  ( ec) ;
  15.  (child & c);
    Assign a child process to the group.
  16.  (child & c,  ec) ;
  17.  (child & c);
    Check if the child process is in the group.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  18.  (child & c,  ec) ;

PrevUpHomeNext