2

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..

morten.c
  • 3,414
  • 5
  • 40
  • 45
CodeFury
  • 1,520
  • 16
  • 29

0 Answers0