Displaying 1 result from an estimated 1 matches for "timeout01".
Did you mean:
timeout02
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...ile("stdin", blocking=TRUE) via setTimeLimit.
OBSERVATION:
On Windows Rterm as well as plain R on Linux, setTimeLimit() does not
momentarily interrupt from stdin, but only after hitting RETURN. A
few examples:
timeout00 <- function() {
setTimeLimit(elapsed=5);
Sys.sleep(10);
}
timeout01 <- function() {
setTimeLimit(elapsed=5);
readline();
}
timeout02 <- function() {
setTimeLimit(elapsed=5);
con <- file("stdin", blocking=TRUE);
on.exit(close(con));
readChar(con, nchars=1);
}
timeout03 <- function() {
setTimeLimit(elapsed=5);
con <- socketC...