I am implementing instant search in an Android app which fetches the search results from REST services. I want to avoid the racing conditions when app fires multiple calls. Any idea on how to implements this? I am using AsyncHttpClient(loopj) for making n/w calls and cancel all the request before i fire a new one using asyncCclient.cancelRequests(getApplicationContext(), true)
and I also use the delay of 250ms between user keystrokes to fire the search. But still in some scenarios racing is happening. Please help..
Asked
Active
Viewed 164 times
2