Skip to content

Commit

Permalink
Message
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 21, 2024
1 parent ee05d15 commit 2a92719
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ bool ScopedInterruptHandler::HandleInterrupt() const {
D_ASSERT(context);
}

// We're presumably still blocking interrupts here in the R session,
// so this is likely equivalent to cpp11::safe[Rf_onintrNoResume]()
// This seems necessary to work around a specificity with the RStudio IDE on Windows.
// Without the message, the interrupt is not available as a catchable condition.
// https://github.com/krlmlr/cancel.test/issues/1
cpp11::message("");

// FIXME: Is this equivalent to cpp11::safe[Rf_onintrNoResume](), or worse?
cpp11::safe[Rf_onintr]();
return true;
}
Expand Down

0 comments on commit 2a92719

Please sign in to comment.