getting strange exception trying to implement asynchronous http in google app engine for java

后端 未结 3 853
粉色の甜心
粉色の甜心 2020-12-18 01:57

I\'m trying to implement async http in java. Here is the important part of the code:

for (String urlString : urls) 
{ 
    // TODO: try and get rid of the         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-18 02:17

    My only guess is that it's due to a Future not completing before attempting to access its response. But that's a complete and utter guess!

    Maybe check each of the futureResponses .isDone() and .isCancelled() before accessing its .get().

提交回复
热议问题