State

inline bool libsemigroups::Runner::dead() const noexcept

Check if the runner is dead.

This function can be used to check if we should terminate run() because it has been killed by another thread.

See also

kill()

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

Returns

A bool.

inline bool libsemigroups::Runner::finished() const

Check if run has been run to completion or not.

Returns true if run() has been run to completion. For this to work, the implementation of run() in a derived class of Runner must implement a specialisation of finished_impl.

See also

started()

Parameters

(None)

Returns

A bool.

inline bool libsemigroups::Runner::running() const noexcept

Check if currently running.

See also

finished()

Parameters

(None)

Returns

true if run() is in the process of running and false it is not.

Returns

A bool.

inline bool libsemigroups::Runner::started() const

Check if run has been called at least once before.

Returns true if run() has started to run (it can be running or not).

See also

finished()

Parameters

(None)

Returns

A bool.

inline bool libsemigroups::Runner::stopped() const

Check if the runner is stopped.

This function can be used to check whether or not run() has been stopped for whatever reason. In other words, it checks if timed_out(), finished(), or dead().

Parameters

(None)

Returns

A bool.

inline bool libsemigroups::Runner::stopped_by_predicate() const

Check if the runner was, or should, stop because of the argument for run_until.

If this is running, then the nullary predicate is called and its return value is returned. If this is not running, then true is returned if and only if the last time this was running it was stopped by a call to the nullary predicate passed to run_until().

Complexity

Constant.

Parameters

(None)

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A bool.

inline bool libsemigroups::Runner::timed_out() const

Check if the amount of time passed to run_for has elapsed.

Parameters

(None)

Returns

A bool