forked from boostorg/asio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change spawn() to be a completion token-based async operation.
Added new spawn() overloads that conform to the requirements for asynchronous operations. These overloads also support cancellation. When targeting C++11 and later these functions are implemented in terms of Boost.Context directly. The existing overloads have been retained but are deprecated.
- Loading branch information
1 parent
74a94fe
commit 5bbdc9b
Showing
10 changed files
with
1,869 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// detail/exception.hpp | ||
// ~~~~~~~~~~~~~~~~~~~~ | ||
// | ||
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
// | ||
|
||
#ifndef BOOST_ASIO_DETAIL_EXCEPTION_HPP | ||
#define BOOST_ASIO_DETAIL_EXCEPTION_HPP | ||
|
||
#if defined(_MSC_VER) && (_MSC_VER >= 1200) | ||
# pragma once | ||
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) | ||
|
||
#include <boost/asio/detail/config.hpp> | ||
|
||
#if defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
# include <exception> | ||
#else // defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
# include <boost/exception_ptr.hpp> | ||
#endif // defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
|
||
namespace boost { | ||
namespace asio { | ||
|
||
#if defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
using std::exception_ptr; | ||
using std::current_exception; | ||
using std::rethrow_exception; | ||
#else // defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
using boost::exception_ptr; | ||
using boost::current_exception; | ||
using boost::rethrow_exception; | ||
#endif // defined(BOOST_ASIO_HAS_STD_EXCEPTION) | ||
|
||
} // namespace asio | ||
} // namespace boost | ||
|
||
#endif // BOOST_ASIO_DETAIL_EXCEPTION_HPP |
Oops, something went wrong.