1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terminal.R
\name{terminalBusy}
\alias{terminalBusy}
\title{Is Terminal Busy}
\usage{
terminalBusy(id)
}
\arguments{
\item{id}{The terminal id. The \code{id} is obtained from
\code{\link{terminalList}()}, \code{\link{terminalVisible}()},
\code{\link{terminalCreate}()}, or \code{\link{terminalExecute}()}.}
}
\value{
a boolean
}
\description{
Are terminals reporting that they are busy?
}
\details{
This feature is only supported on RStudio Desktop for Mac and Linux, and
RStudio Server. It always returns \code{FALSE} on RStudio Desktop for
Microsoft Windows.
}
\note{
The \code{terminalBusy} function was added in version 1.1.350 of
RStudio.
}
\examples{
\dontrun{
# 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")
}
}
|