this_thread.hpp 983 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Copyright (c) 2022 Klemens Morgenstern ([email protected])
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_COBALT_THIS_THREAD_HPP
  8. #define BOOST_COBALT_THIS_THREAD_HPP
  9. #include <boost/cobalt/config.hpp>
  10. #include <boost/config.hpp>
  11. #include <boost/asio/io_context.hpp>
  12. namespace boost::cobalt::this_thread
  13. {
  14. #if !defined(BOOST_COBALT_NO_PMR)
  15. BOOST_COBALT_DECL pmr::memory_resource* get_default_resource() noexcept;
  16. BOOST_COBALT_DECL pmr::memory_resource* set_default_resource(pmr::memory_resource* r) noexcept;
  17. BOOST_COBALT_DECL pmr::polymorphic_allocator<void> get_allocator();
  18. #endif
  19. BOOST_COBALT_DECL
  20. executor & get_executor(
  21. const boost::source_location & loc = BOOST_CURRENT_LOCATION);
  22. BOOST_COBALT_DECL bool has_executor();
  23. BOOST_COBALT_DECL void set_executor(executor exec) noexcept;
  24. }
  25. #endif //BOOST_COBALT_THIS_THREAD_HPP