Open toomish opened 1 year ago
library(later) serv <- serverSocket(2000) f <- function() { sock <- socketConnection(port = 2000, blocking = TRUE, timeout = 1) recv <- readLines(sock) stopifnot(!length(recv)) writeLines("timeout") close(sock) } later(f) run_now()
f() called with later deadlock forever. Without later will be timeout as expected after 1 second.
strace shows following constantly repeated lines:
pselect6(10, [4 6 9], [], NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [4], left {tv_sec=0, tv_nsec=967908952}) ... read(4, "a", 256)
Where 4, 6 are pipes and 9 is my socket descriptor.
f() called with later deadlock forever. Without later will be timeout as expected after 1 second.
strace shows following constantly repeated lines:
Where 4, 6 are pipes and 9 is my socket descriptor.