Commit 7ce5373
committed
frollapply: let the interrupt continue
Instead of calling invokeRestart("abort") in the interrupt handler,
return from it. This continues the dispatch of the interrupt and lets an
outer handler catch it:
tryCatch(
frollapply(1:1e6, 1, \(.) { Sys.sleep(ret <- sum(.)); ret}),
interrupt = \(e) 'interrupted'
)
^C[1] "interrupted"
With invokeRestart("abort"), the interrupt cannot be handled further.1 parent 992b389 commit 7ce5373
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
418 | 417 | | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
0 commit comments