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).