R/available.R

Defines functions winch_available

Documented in winch_available

#' Are native tracebacks available?
#'
#' Returns `TRUE` if [winch_trace_back()] is supported on this platform.
#'
#' @return A scalar logical.
#' @export
#' @examples
#' winch_available()
winch_available <- function() {
  # https://stackoverflow.com/a/62364698/946850
  if (grepl("/valgrind/|/vgpreload_", Sys.getenv("LD_PRELOAD"))) {
    return(FALSE)
  }
  # in zzz.R
  default_method != 0L
}
r-prof/winch documentation built on June 12, 2025, 10:56 p.m.