Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-17 08:38:17

0001 //
0002 // impl/awaitable.ipp
0003 // ~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 
0011 #ifndef BOOST_ASIO_IMPL_AWAITABLE_IPP
0012 #define BOOST_ASIO_IMPL_AWAITABLE_IPP
0013 
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
0017 
0018 #include <boost/asio/detail/config.hpp>
0019 
0020 #if defined(BOOST_ASIO_HAS_CO_AWAIT)
0021 
0022 #include <boost/asio/awaitable.hpp>
0023 #include <boost/asio/detail/call_stack.hpp>
0024 
0025 #include <boost/asio/detail/push_options.hpp>
0026 
0027 namespace boost {
0028 namespace asio {
0029 namespace detail {
0030 
0031 void awaitable_launch_context::launch(void (*pump_fn)(void*), void* arg)
0032 {
0033   call_stack<awaitable_launch_context>::context ctx(this);
0034   pump_fn(arg);
0035 }
0036 
0037 bool awaitable_launch_context::is_launching()
0038 {
0039   return !!call_stack<awaitable_launch_context>::contains(this);
0040 }
0041 
0042 } // namespace detail
0043 } // namespace asio
0044 } // namespace boost
0045 
0046 #include <boost/asio/detail/pop_options.hpp>
0047 
0048 #endif // defined(BOOST_ASIO_HAS_CO_AWAIT)
0049 
0050 #endif // BOOST_ASIO_IMPL_AWAITABLE_IPP