.net - How to detect the owner of an async call response -


i 'm calling web service method in timer delegate every 5 seconds using async/await. response number in json format. problem server of web service pretty slow , inconsistent. response coming under 1 seconds, isn't rare case wait response 5-10 seconds. question how can detect response belonging call.

for example:

call1 @ 20:00:00 call2 @ 20:00:05  responsea @ 20:00:07 responseb @ 20:00:09 

how should deduct if responsea belonging call1 or call2 ?

what want omit/ignore responseb further data processing, if belongs call1, since outdated data in case.

alternatively, make next(second) webcall when response previous(first) webcall, inefficient since webcall can lag 15 seconds in worst case.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -