About the original code discussed in #1875:
```java
for (Map.Entry<String, Future<Result>> entry : results.entrySet()) {
Future<Result> future = entry.getValue();
try {
Result r = future.get(timeout, TimeUnit.MILLISECONDS);
if (r.hasException()) {
log.error("Invoke " +
getGroupDescFromServiceKey(entry.getKey()) +
" failed: " + r.getException().getMessage(),
r.getException());
} else {
resultList.add(r);
}
} catch (Exception e) {
throw new RpcException("Failed to invoke service " +
entry.getKey() + ": " + e.getMessage(), e);
}
}
```
I think if the global timeout is 5s, then each `invoker.invoke()` has been
restricted to return a value in 5s (it can be a normal value or timeout
exception), it will in turn complete the corresponding future, so all
`future.get` will not block and will return immediatelly after 5s.
[ Full content available at:
https://github.com/apache/incubator-dubbo/pull/3498 ]
This message was relayed via gitbox.apache.org for
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]