ALPSCore reference
alps::stop_callback Class Reference

Functor-predicate: is it time to stop? More...

#include <stop_callback.hpp>

Collaboration diagram for alps::stop_callback:

## Public Member Functions

stop_callback (std::size_t timelimit)
Initializes the functor with the desired time duration. More...

bool operator() () const
Returns true if it's time to stop (time is up or signal is received) More...

## Detailed Description

Functor-predicate: is it time to stop?

The functor is initialized with desired duration, and returns true when the root process receives a signal or time runs out on the root.

Definition at line 25 of file stop_callback.hpp.

## Constructor & Destructor Documentation

 alps::stop_callback::stop_callback ( std::size_t timelimit )

Initializes the functor with the desired time duration.

Parameters
 timelimit Time limit (seconds); 0 means "indefinitely"

Definition at line 14 of file stop_callback.cpp.

## Member Function Documentation

 bool alps::stop_callback::operator() ( ) const

Returns true if it's time to stop (time is up or signal is received)

Definition at line 25 of file stop_callback.cpp.

The documentation for this class was generated from the following files: