On Mon, Dec 7, 2009 at 2:39 AM, Helmut Eller heller@common-lisp.net wrote:
- Elliott Slaughter [2009-12-07 10:30+0100] writes:
I've been reading the manual page on swank communication style, and it
sounds
like the :spawn option does what I want. Unfortunately, thread support is
not
universal, and happens to missing on one of my main development platforms (SBCL on Windows). Is there any way I can work around this (e.g. add
swank
callbacks to my application)? I know this is kind of a long shot but it
would
be kind of nice to get this working independent of implementation thread support.
There's also :sigio which doesn't need threads but probably also not available on Windows.
Your application could call swank::handle-requests from time to time. The timeout argument should be 0 to poll the socket without blocking. :fd-handler style does just that whenever SBCL performs a blocking read. For this, read-char-no-hang should work for sockets which was broken the last time I checked. Maybe it's fixed now.
When I try 0 as timeout, I get this error:
The assertion (OR (NOT SWANK::TIMEOUT) (EQ SWANK::TIMEOUT T)) failed.
When I use t as timeout, it does basically what I want, but I'd rather have the timeout be immediate (no wait). Is there any way to do this?
Also, it isn't entirely clear what I should pass as a connection to handle-requests. Right now I'm using (or swank::*emacs-connection* (swank::default-connection)) which seems to work fine.
Thanks for the help.
From Emacs, entering the debgger with C-c C-b should work most of the time (as usual, may be broken on Windows). And it should be possible to use most commands on top of the debugger.
I think ILisp had a option to always send an interrupt before a command. Not sure how well that would work.
There's also CCL which has a less handicapped Windows port.