ALPSCore reference
Public Member Functions | List of all members
alps::stop_callback Class Reference

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

#include <stop_callback.hpp>

Collaboration diagram for alps::stop_callback:
Collaboration graph

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
timelimitTime 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: