search for: timeout03

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

Did you mean: timeout01
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...<- 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(con, nchars=1); } # Times out after 5 second > timeout00() Error in Sys.sleep(10) : reached elapsed time limit # Times out only after pressing ENTER > time...