From: Christophe Rhodes Date: Fri, 3 Sep 2010 07:07:43 +0000 (+0100) Subject: integrate into R's event loop, possibly X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=ab6021d4671892eabc80b7cde045db632176116e;p=swankr.git 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. --- 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)