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
- 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 offinished_impl
.See also
- Parameters
(None)
- Returns
A
bool
.
-
inline bool libsemigroups::Runner::running() const noexcept¶
Check if currently running.
See also
- Parameters
(None)
- Returns
true
if run() is in the process of running andfalse
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
- 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. Ifthis
is not running, thentrue
is returned if and only if the last timethis
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
.