Is Terminal Busy
Are terminals reporting that they are busy?
terminalBusy(id)
id |
The terminal id. The |
This feature is only supported on RStudio Desktop for Mac and Linux, and
RStudio Server. It always returns FALSE
on RStudio Desktop for
Microsoft Windows.
a boolean
The terminalBusy
function was added in version 1.1.350 of
RStudio.
## Not run: # create a hidden terminal and run a lengthy command termId <- rstudioapi::terminalCreate(show = FALSE) rstudioapi::terminalSend(termId, "sleep 5\n") # wait until a busy terminal is finished while (rstudioapi::terminalBusy(termId)) { Sys.sleep(0.1) } print("Terminal available") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.