Runner

class Runner

Many of the classes in libsemigroups implementing the algorithms, that are the reason for the existence of this library, are derived from Runner. The Runner class exists to collect various common tasks required by such a derived class with a possibly long running run. These common tasks include:

  • running for a given amount of time (run_for)

  • running until a nullary predicate is true (run_until)

  • reporting after a given amount of time (report_every)

  • checking if the given amount of time has elapsed since last report (report)

  • checking the status of the algorithm: has it started? finished? been killed by another thread (dead)? has it timed out (timed_out)? has it stopped for any reason?

  • permit the function run to be killed from another thread (kill).

Constructors

Runner()

Runner(Runner const&)

Runner(Runner&&)

operator=(Runner const&)

operator=(Runner&&)

Reporting

report() const

report_every() const noexcept

report_every(TIntType)

report_every(std::chrono::nanoseconds)

report_why_we_stopped() const

State

dead() const noexcept

finished() const

running() const noexcept

started() const

stopped() const

stopped_by_predicate() const

timed_out() const

Operators

kill() noexcept

run()

run_for(TIntType)

run_for(std::chrono::nanoseconds)

run_until(T&&)

run_until(bool(*)())

running_for() const noexcept

running_until() const noexcept