Skip to content

Parallel interrupts problem #720

@hadley

Description

@hadley
repeat {
  req_parallel_requests()
}

is very hard to escape from. And you can't solve it by wrapping in another tryCatch():

tryCatch(
  repeat {
    req_parallel_requests()
  },
  interrupt = function(cnd) stop("!")
}

because the interrupt is captured and doesn't bubble up.

Two possible ideas:

  • Record the time between interrupts and if it's less than a threshold (suggesting that the user has pressed Ctrl + C twice in a row), resignal the interrupt.
  • Resignal something that an enclosing scope could capture

(or possibly both)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions