summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-15 04:15:13 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-15 04:15:13 +1100
commit44ec6d2e0ee569202b75b73eea40972595866779 (patch)
treeb286443c264704198789514e0594dc24b3ca9f96 /3rdparty/asio/src/examples/cpp11/executors/actor.cpp
parent137f254b918f1f1ebee43dfbed86793b0dae73eb (diff)
3rdparty: Updated ASIO to version 1.20.0.
The doc folder isn't included as it's pretty big. This required include/asio/detail/win_iocp_socket_accept_op.hpp due to mismatched order in the member declarations and initialiser list for the win_iocp_socket_accept_op class. I reversed the declaration order so it matches win_iocp_socket_move_accept_op.
Diffstat (limited to '3rdparty/asio/src/examples/cpp11/executors/actor.cpp')
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/actor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdparty/asio/src/examples/cpp11/executors/actor.cpp b/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
index 22dbf206a17..1f0e2c11308 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
@@ -1,5 +1,5 @@
+#include <asio/any_io_executor.hpp>
#include <asio/defer.hpp>
-#include <asio/executor.hpp>
#include <asio/post.hpp>
#include <asio/strand.hpp>
#include <asio/system_executor.hpp>
@@ -10,8 +10,8 @@
#include <typeinfo>
#include <vector>
+using asio::any_io_executor;
using asio::defer;
-using asio::executor;
using asio::post;
using asio::strand;
using asio::system_executor;
@@ -106,7 +106,7 @@ public:
protected:
// Construct the actor to use the specified executor for all message handlers.
- actor(executor e)
+ actor(any_io_executor e)
: executor_(std::move(e))
{
}
@@ -124,7 +124,7 @@ protected:
template <class Actor, class Message>
void deregister_handler(void (Actor::* mf)(Message, actor_address))
{
- const std::type_info& id = typeid(message_handler<Message>);
+ const std::type_info& id = typeid(Message);
for (auto iter = handlers_.begin(); iter != handlers_.end(); ++iter)
{
if ((*iter)->message_id() == id)
@@ -171,7 +171,7 @@ private:
// All messages associated with a single actor object should be processed
// non-concurrently. We use a strand to ensure non-concurrent execution even
// if the underlying executor may use multiple threads.
- strand<executor> executor_;
+ strand<any_io_executor> executor_;
std::vector<std::shared_ptr<message_handler_base>> handlers_;
};
@@ -221,7 +221,7 @@ using asio::thread_pool;
class member : public actor
{
public:
- explicit member(executor e)
+ explicit member(any_io_executor e)
: actor(std::move(e))
{
register_handler(&member::init_handler);