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

Additional thread added to io_service when io_service is passed from outside. #430

Closed
Assignees
deanberris
Milestone
@eakraly

Description

@eakraly

In my code I use io_service with strictly one thread (for various reasons). But when I pass this io_service to http::client as argument in (in network::http::client::options) it adds new thread to io_service - which breaks my code. Here is the offencive code inasync_impl.http:60

lifetime_thread_.reset(new boost::thread(            boost::bind(&boost::asio::io_service::run, &service_)));

The thread is created whether io_service was passed from outside or not.
IMHO, if user passes io_service from outside then http::client cannot change it nor release it as it is external reasource.

For now I fixed it locally by

if (!service){    lifetime_thread_.reset(new boost::thread(    boost::bind(&boost::asio::io_service::run, &service_)));}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp