![]() |
Home | Libraries | People | FAQ | More |
boost::process::group
// 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 &, ) ; };
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 |
---|---|
If the destructor is called without a previous detach or wait, the group will be terminated. |
![]() |
Note |
---|---|
If a default-constructed group is used before being used in a process launch, the behaviour is undefined. |
![]() |
Note |
---|---|
Waiting for groups is currently broken on windows and will most likely result in a dead-lock. |
group
public
construct/copy/destruct( ch);
( handle);Construct the group from a native_handle.
(group &) = ;
(group && lhs);Move constructor.
() = ;Default constructor.
group & (group &) = ;
group & (group && lhs);Move assign.
~();
Destructor
![]() |
Note |
---|---|
If the destructor is called without a previous detach or wait, the group will be terminated. |
group
public member functions();Detach the group.
();
Join the child. This just calls wait, but that way the naming is similar to std::thread
();
Check if the child is joinable.
() ;Obtain the native handle of the group.
();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.
( ec) ;
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. |
template<typename Rep, typename Period> ( rel_time, ec) ;
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. |
template<typename Clock, typename Duration> ( timeout_time, ec) ;
() ;Check if the group has a valid handle.
() ;Convenience to call valid.
();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.
( ec) ;
(child & c);Assign a child process to the group.
(child & c, ec) ;
(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.
(child & c, ec) ;