Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

execution_context.ipp 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // impl/execution_context.ipp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_IMPL_EXECUTION_CONTEXT_IPP
  11. #define ASIO_IMPL_EXECUTION_CONTEXT_IPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include "asio/execution_context.hpp"
  17. #include "asio/detail/service_registry.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. execution_context::execution_context()
  21. : service_registry_(new asio::detail::service_registry(*this))
  22. {
  23. }
  24. execution_context::~execution_context()
  25. {
  26. shutdown();
  27. destroy();
  28. delete service_registry_;
  29. }
  30. void execution_context::shutdown()
  31. {
  32. service_registry_->shutdown_services();
  33. }
  34. void execution_context::destroy()
  35. {
  36. service_registry_->destroy_services();
  37. }
  38. void execution_context::notify_fork(
  39. asio::execution_context::fork_event event)
  40. {
  41. service_registry_->notify_fork(event);
  42. }
  43. execution_context::service::service(execution_context& owner)
  44. : owner_(owner),
  45. next_(0)
  46. {
  47. }
  48. execution_context::service::~service()
  49. {
  50. }
  51. void execution_context::service::notify_fork(execution_context::fork_event)
  52. {
  53. }
  54. service_already_exists::service_already_exists()
  55. : std::logic_error("Service already exists.")
  56. {
  57. }
  58. invalid_service_owner::invalid_service_owner()
  59. : std::logic_error("Invalid service owner.")
  60. {
  61. }
  62. } // namespace asio
  63. #include "asio/detail/pop_options.hpp"
  64. #endif // ASIO_IMPL_EXECUTION_CONTEXT_IPP