java - Parallel HTTP requests with Retrofit -
I have an Android app that currently creates I would like to test the capabilities of Is that correct? If so, is there an Android-oriented implementation / library available? Otherwise, what are the best practices for handling parallel requests? Uses an Default You can change this behavior, however, volley network requests and downloaded images With
NetworkImageView is being used to show
Retrofit and since I have to run a lot of requests (thousands), I'm concerned about a little parallel execution
volley
RequestQueue which limits concurrent running requests to four, while others are waiting to execute the requests. In the
Retrofit documentation, I have not found any way to handle the number of concurrent requests and I suspect that this information has been left to the developer in this library.
digitizer for retrieiting queuing requests.
Executor. NewcachedThreadPool uses which allows for unlimited threads. This usually fits more use cases than you usually have one or two requests at once.
RestAdapter . Call and pass in an executable that uses a limited thread pool (limited to whatever you want). For the second argument, just give a new example so that the callback is on the main thread.
Comments
Post a Comment