search for: timeout02

Displaying 1 result from an estimated 1 matches for "timeout02".

Did you mean: timeout01
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...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 <- socketConnection(port=6011, blocking=TRUE); on.exit(close(con)); readChar(co...