Runner¶
-
class
Runner
¶ Derived classes of this abstract class must implement a member function Runner::run_impl.
The Runner class exists to collect various common tasks required by such a derived class with a possibly long running Runner::run_impl implementation. These include:
running for a given amount of time (Runner::run_for)
running until a nullary predicate is true (Runner::run_until)
reporting after a given amount of time (Runner::report_every)
checking if the given amount of time has elapsed since last report (Runner::report)
checking the status of the Runner::run implementation: has it Runner::started? Runner::finished? been killed by another thread (Runner::dead)? has it timed out (Runner::timed_out)? has it Runner::stopped for any reason?
permit the Runner::run implementation to be killed from another thread (Runner::kill).
The implementation of the
run_impl
member function in a derived class must periodically check whether or not it has stopped for this to work.Subclassed by libsemigroups::Action< BooleanMat, MaxBitSet, ImageRightAction< BooleanMat, MaxBitSet > >, libsemigroups::Action< TElementType, TPointType, TActionType, TTraits, TLeftOrRight >, libsemigroups::CongruenceInterface, libsemigroups::FpSemigroupInterface, libsemigroups::FroidurePinBase, libsemigroups::Konieczny< TElementType, TTraits >