We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b67fe9d commit 351ba56Copy full SHA for 351ba56
README.md
@@ -1330,6 +1330,7 @@ See also [ETS.3](#unneeded-thread-safety) about unneeded thread-safety of a meth
1330
`Future` before asynchronous execution is started**, and is it started at all? Here is the
1331
antipattern:
1332
```java
1333
+// DON'T DO THIS
1334
Future<Salary> getSalary(Employee employee) throws ConnectionException {
1335
Branch branch = retrieveBranch(employee); // A database or an RPC call
1336
return CompletableFuture.supplyAsync(() -> {
@@ -1341,6 +1342,7 @@ Blocking the caller thread is unexpected for a user seeing a method returning a
1341
1342
1343
An example completely without asynchrony:
1344
1345
1346
1347
SalaryDTO salaryDto = retrieveSalary(employee); // A database or an RPC call
1348
Salary salary = toSalary(salaryDto);
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments