Commit 0e4e5b9
committed
Reject promise on any exception
Currently, promises will hang if an exception
is raised that does not extend from StandardError.
```
Concurrent::Promise.execute { raise Exception }.value
...
```
This behavior is unexpected and seems likely to be
wrong for most use cases.
Futures already use `safe_execute` which includes the
`rescue_exception` option.1 parent d2cf37b commit 0e4e5b9
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
623 | 628 | | |
624 | 629 | | |
625 | 630 | | |
| |||
0 commit comments