Skip to content

Commit

Permalink
Merge pull request #839 from martinmodrak/838-wsl_installed_determinstic
Browse files Browse the repository at this point in the history
Changed the delay behavour in wsl_installed
  • Loading branch information
jgabry authored Sep 13, 2023
2 parents b29374e + 7daf92b commit 2911096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Authors@R:
person(given = "Mike", family = "Lawrence", role = "ctb"),
person(given = c("William", "Michael"), family = "Landau", role = "ctb",
email = "[email protected]", comment = c(ORCID = "0000-0003-1878-3253")),
person(given = "Jacob", family = "Socolar", role = "ctb"))
person(given = "Jacob", family = "Socolar", role = "ctb"),
person(given = "Martin", family = "Modrák", role = "ctb"))
Description: A lightweight interface to 'Stan' <https://mc-stan.org>.
The 'CmdStanR' interface is an alternative to 'RStan' that calls the command
line interface for compilation and running algorithms instead of interfacing
Expand Down
7 changes: 6 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,12 @@ wsl_installed <- function() {
tryCatch({
# Call can hang indefinitely on Github actions, so explicitly kill
p <- processx::process$new("wsl", "uname")
Sys.sleep(1)
for(i in 1:50) {
Sys.sleep(0.1)
if(!p$is_alive()) {
break
}
}
if (p$is_alive()) {
p$kill()
FALSE
Expand Down

0 comments on commit 2911096

Please sign in to comment.