Operators

inline void libsemigroups::Runner::kill() noexcept

Stop run from running (thread-safe).

This function can be used to terminate run() from another thread. After kill() has been called the Runner may no longer be in a valid state, but will return true from dead() .

Parameters

(None)

Return

(None).

Exceptions

This function is noexcept and is guaranteed never to throw.

See

finished()

inline void libsemigroups::Runner::run()

Run until finished.

Run the main algorithm implemented by a derived class derived of Runner.

Return

(None)

Parameters

(None)

template<typename TIntType>
inline void libsemigroups::Runner::run_for(TIntType t)

Run for a specified amount of time.

For this to work it is necessary to periodically check if timed_out() returns true, and to stop if it is, in the run() member function of any derived class of Runner.

Return

(None)

See

run_for(std::chrono::nanoseconds)

Parameters
  • t: the time to run for (in TIntType).

void libsemigroups::Runner::run_for(std::chrono::nanoseconds t)

Run for a specified amount of time.

For this to work it is necessary to periodically check if timed_out() returns true, and to stop if it is, in the run() member function of any derived class of Runner.

Return

(None)

See

run_for(TIntType)

Parameters
  • t: the time in nanoseconds to run for.

template<typename T>
inline void libsemigroups::Runner::run_until(T &&func)

Run until a nullary predicate returns true or finished.

Return

(None)

Parameters
  • func: a callable type that will exist for at least until this function returns, or a function pointer.

inline void libsemigroups::Runner::run_until(bool (*func)())

Run until a nullary predicate returns true or finished.

Return

(None)

Parameters
  • func: a function pointer.