summaryrefslogtreecommitdiff
path: root/devel/cpprestsdk/files/patch-src_pplx_threadpool.cpp
blob: f52ce704684eb29f2644bcb874b5788478832e35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/pplx/threadpool.cpp.orig	2023-12-05 04:23:31 UTC
+++ src/pplx/threadpool.cpp
@@ -37,7 +37,7 @@ struct threadpool_impl final : crossplat::threadpool
 
 struct threadpool_impl final : crossplat::threadpool
 {
-    threadpool_impl(size_t n) : crossplat::threadpool(n), m_work(m_service)
+    threadpool_impl(size_t n) : crossplat::threadpool(n), m_work(boost::asio::make_work_guard(m_service))
     {
         for (size_t i = 0; i < n; i++)
             add_thread();
@@ -84,7 +84,7 @@ struct threadpool_impl final : crossplat::threadpool
     }
 
     std::vector<std::unique_ptr<boost::asio::detail::thread>> m_threads;
-    boost::asio::io_service::work m_work;
+    boost::asio::executor_work_guard<boost::asio::io_context::executor_type > m_work;
 };
 
 #if defined(_WIN32)