unreasonable Thread Usage.
See original GitHub issueHi there ! , i am wondering why okhttp create new threads even when i use it Synchronous. here is my sample code :
//Thread.activeCount() return 1
OkHttpClient client = new OkHttpClient();
//this line create 2 new threads but why ? , what's wrong with using current thread ?!
Response response = client.newCall(new Request.Builder().url("https://google.com").get().build()).execute();
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why Too Many Threads Hurts Performance, and What to do ...
First, partitioning a fixed amount of work among too many threads gives each thread too little work that the overhead of starting and ......
Read more >Best Thread Count for Sheets | Sleep Foundation
Looking for sheets with a reasonable thread count (200-600 for most ... inflate the thread count is to use double- or triple-ply threads, ......
Read more >Thread Count Guide: What Does It Mean for Sheets & Bedding?
Anything with a thread count nearing (or above) 1000 thread count is almost certain to be significantly lower quality than sheets with a...
Read more >The Most Responsible Fabric on the Planet: Q&A With Thread
Thread produces fabrics from plastic bottles found in the streets of some of the poorest communities on earth, providing jobs to thousands ...
Read more >What constitutes proper use of threads in programming?
For a web server it might be reasonable to fire a thread for each incoming connection (although there are better ways for very...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s explained here. No plans to change that. https://github.com/square/okhttp/wiki/Concurrency
Yeah, but that library doesn’t use HTTP/2. OkHttp only spins up another thread for HTTP/2.