Commit f9d8a9d
committed
Support blocking with:
I believe this implements the somewhat reluctant consensus
reached in scala#43. Go with the flow by allowing people to block
using the standard Java 8 idiom of `toCompletableFuture.get`.
I've added a comment and a test to caution that calling
`toCompletableFuture.complete(value)` does *not* effect the underlying
Promise.
Fixes scala#43scalaFuture.toJava.toCompletableFuture
1 parent 416fe31 commit f9d8a9d
File tree
2 files changed
+32
-2
lines changed- src
- main/scala/scala/concurrent/java8
- test/java/scala/compat/java8
2 files changed
+32
-2
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
321 | 344 | | |
0 commit comments