| 1 | // |
|---|---|
| 2 | // Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) |
| 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 | |
| 8 | #ifndef BOOST_COBALT_THIS_THREAD_HPP |
| 9 | #define BOOST_COBALT_THIS_THREAD_HPP |
| 10 | |
| 11 | #include <boost/cobalt/config.hpp> |
| 12 | #include <boost/config.hpp> |
| 13 | |
| 14 | |
| 15 | #include <boost/asio/io_context.hpp> |
| 16 | |
| 17 | namespace boost::cobalt::this_thread |
| 18 | { |
| 19 | |
| 20 | #if !defined(BOOST_COBALT_NO_PMR) |
| 21 | BOOST_COBALT_DECL pmr::memory_resource* get_default_resource() noexcept; |
| 22 | BOOST_COBALT_DECL pmr::memory_resource* set_default_resource(pmr::memory_resource* r) noexcept; |
| 23 | BOOST_COBALT_DECL pmr::polymorphic_allocator<void> get_allocator(); |
| 24 | #endif |
| 25 | |
| 26 | BOOST_COBALT_DECL |
| 27 | executor & get_executor( |
| 28 | const boost::source_location & loc = BOOST_CURRENT_LOCATION); |
| 29 | BOOST_COBALT_DECL bool has_executor(); |
| 30 | BOOST_COBALT_DECL void set_executor(executor exec) noexcept; |
| 31 | |
| 32 | } |
| 33 | |
| 34 | #endif //BOOST_COBALT_THIS_THREAD_HPP |
| 35 |
