I have a web method to get the flight data from airline, we make asynchronous call to get available flights and then for each flight we again make again make asynchronous call to get the price. It looks like one thread is making using of the response we get from other thread.
Consider a search criteria LHR (London) - CDG (Paris) one way search. We got 3 flights for the route (flights A, B and C), then we make 3 async calls for getting the fare for each flight, this is done by calling airline web service method.
My query is can flight1 uses the fare response we got for flight 2 ?
for(int a=0;a< flightcount;++i)
{
MethodDelegate dglt;
dglt = new MethodDelegateCP(GetClassBasedResponseAsync);
asyncResultIn = dglt.BeginInvoke(a, null, null);
}
private ArrayList GetClassBasedResponseAsync(string flightno)
Make a airline webservice call to get the fare response.
WebResponse response = request.GetResponse();
Some logic to process the response and return the result back to the calling function
Is there any possibility that WebResponse
we got for flight A is processed for flight B, i.e thread for flight A is making use of response we got for Thread B.