.. Copyright (c) 2019-22, J. D. Mitchell

   Distributed under the terms of the GPL license version 3.

   The full license is in the file LICENSE, distributed with this software.

   This file was auto-generated by docs/generate_from_yml.py, do not edit.

Runner
======

.. doxygenclass:: libsemigroups::Runner
   :project: libsemigroups

.. cpp:namespace:: libsemigroups::Runner


Constructors
------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`Runner() <Runner::Runner()>`
     - Default constructor.


   * - :cpp:member:`Runner(Runner const&)`
     - Copy constructor.


   * - :cpp:member:`Runner(Runner&&)`
     - Move constructor.


   * - :cpp:member:`operator=(Runner const&)`
     - Copy assignment operator.


   * - :cpp:member:`operator=(Runner&&)`
     - Move assignment operator.



Reporting
---------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`report() const`
     - Check if it is time to report.


   * - :cpp:member:`report_every() const noexcept`
     - Get the minimum elapsed time between reports.


   * - :cpp:member:`report_every(TIntType) <template <typename TIntType> void report_every(TIntType)>`
     - Set the minimum elapsed time between reports.


   * - :cpp:member:`report_every(std::chrono::nanoseconds)`
     - Set the minimum elapsed time between reports.


   * - :cpp:member:`report_why_we_stopped() const`
     - Report why :cpp:member:`run`  stopped.



State
-----
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`dead() const noexcept`
     - Check if the runner is dead.


   * - :cpp:member:`finished() const`
     - Check if :cpp:member:`run`  has been run to completion or not.


   * - :cpp:member:`running() const noexcept`
     - Check if currently running.


   * - :cpp:member:`started() const`
     - Check if :cpp:member:`run`  has been called at least once before.


   * - :cpp:member:`stopped() const`
     - Check if the runner is stopped.


   * - :cpp:member:`stopped_by_predicate() const`
     - Check if the runner was, or should, stop because of the argument for :cpp:member:`run_until` .


   * - :cpp:member:`timed_out() const`
     - Check if the amount of time passed to :cpp:member:`run_for`  has elapsed.



Operators
---------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`kill() noexcept`
     - Stop :cpp:member:`run`  from running (thread-safe).


   * - :cpp:member:`run()`
     - Run until :cpp:member:`finished` .


   * - :cpp:member:`run_for(TIntType) <template <typename TIntType> void run_for(TIntType)>`
     - Run for a specified amount of time.


   * - :cpp:member:`run_for(std::chrono::nanoseconds)`
     - Run for a specified amount of time.


   * - :cpp:member:`run_until(T&&) <template <typename T> void run_until(T&&)>`
     - Run until a nullary predicate returns ``true`` or :cpp:member:`finished` .


   * - :cpp:member:`run_until(bool(*)())`
     - Run until a nullary predicate returns ``true`` or :cpp:member:`finished` .


   * - :cpp:member:`running_for() const noexcept`
     - Check if the runner is currently running for a particular length of time.


   * - :cpp:member:`running_until() const noexcept`
     - Check if the runner is currently running until a nullary predicate returns ``true``.



.. toctree::
   :hidden:

   libsemigroups__runner__constructors.rst
   libsemigroups__runner__reporting.rst
   libsemigroups__runner__state.rst
   libsemigroups__runner__operators.rst
