supervisor_config.h 685 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. //
  3. // Copyright (c) 2019 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include <boost/date_time/posix_time/posix_time.hpp>
  8. #include "policy.h"
  9. namespace rotor {
  10. namespace pt = boost::posix_time;
  11. /** \struct supervisor_config_t
  12. * \brief base supervisor config, which holds shutdowm timeout value
  13. */
  14. struct supervisor_config_t {
  15. /** \brief how much time is allowed to spend in shutdown for children actor */
  16. pt::time_duration shutdown_timeout;
  17. /** \brief how to behave if child-actor fails */
  18. supervisor_policy_t policy = supervisor_policy_t::shutdown_self;
  19. };
  20. } // namespace rotor