ports/devel/cpprestsdk/files/patch-src_pplx_threadpool.cpp
Jan-Espen Oversand 83ff85c6c7 devel/cpprestsdk: unbreak build with boost >=1.87 and take maintainership
While here, add test target.

Co-authored-by: Hiroki Tagato <tagattie@FreeBSD.org>

PR:		286905
Reported by:	Jan-Espen Oversand <sigsegv@radiotube.org> (new maintainer)
2025-06-23 22:06:01 +09:00

21 lines
784 B
C++

--- 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)