Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpclient will still use 40 threads #1116

Open
ghost opened this issue Apr 19, 2019 · 2 comments
Open

httpclient will still use 40 threads #1116

ghost opened this issue Apr 19, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 19, 2019

I found even the client side will start 40 threads, I am working on a ARM box environment, 40 threads are too much, is this correct behavior?

(gdb) bt
#0 __pthread_create_2_1 (newthread=0x7fffffd8f0, attr=0x0, start_routine=0x4bc448 <(anonymous namespace)::threadpool_impl::thread_start(void*)>,
arg=0x74ccd0 crossplat::threadpool::shared_instance()::s_shared) at pthread_create.c:505
#1 0x00000000004bcdec in crossplat::threadpool::shared_instance() ()
#2 0x00000000004bf148 in web::http::client::details::create_platform_final_pipeline_stage(web::uri&&, web::http::client::http_client_config&&) ()
#3 0x0000000000481b78 in web::http::client::http_client::http_client(web::uri const&, web::http::client::http_client_config const&) ()
#4 0x0000000000481ee0 in web::http::client::http_client::http_client(web::uri const&) ()

@chenyicong
Copy link

hi,
actually, you can change number of thread there: threadpool.cpp::threadpool& threadpool::shared_instance()

@mohamedAlaaK
Copy link

you need to call this at the start of the program
crossplat::threadpool::initialize_with_threads(num_threads);
and include this header <pplx/threadpool.h>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants