From ab6021d4671892eabc80b7cde045db632176116e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 3 Sep 2010 08:07:43 +0100 Subject: [PATCH] integrate into R's event loop, possibly in readPacket, call socketSelect() before actually trying to read on the connection. This seems to allow R to update graphics windows and other such niceties. It would be nice to be able to preserve the (inferior) R REPL as well, but I haven't yet discovered whether that's possible. --- swank.R | 1 + 1 file changed, 1 insertion(+) diff --git a/swank.R b/swank.R index 1dc95b4..99f508b 100644 --- a/swank.R +++ b/swank.R @@ -113,6 +113,7 @@ sldbLoop <- function(slimeConnection, sldbState, id) { } readPacket <- function(io) { + socketSelect(list(io)) header <- readChunk(io, 6) len <- strtoi(header, base=16) payload <- readChunk(io, len) -- 2.39.5