Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc1d5ea

Browse files
committed
Conditional async_client liftetime_thread creation
Create a thread and add it to io_service only if io_service is internal. If internal - do not change it.
1 parent28ba508 commitcc1d5ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎boost/network/protocol/http/client/async_impl.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ struct async_client
5757
always_verify_peer_(always_verify_peer) {
5858
connection_base::resolver_strand_.reset(
5959
newboost::asio::io_service::strand(service_));
60-
lifetime_thread_.reset(newboost::thread(
61-
boost::bind(&boost::asio::io_service::run, &service_)));
60+
if(service)
61+
lifetime_thread_.reset(newboost::thread(
62+
boost::bind(&boost::asio::io_service::run, &service_)));
6263
}
6364

6465
~async_client()throw() {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp