[slime-devel] output from sbcl threads

Helmut Eller heller at common-lisp.net
Sat Oct 11 09:07:29 UTC 2008


* Michael Weber [2008-10-10 13:07+0200] writes:

> On Oct 10, 2008, at 11:20 , Giovanni Gigante wrote:
>
>> (sb-thread:make-thread (lambda () (format t  "hello world")))
>>
>> on the REPL I get something like
>> #<SB-THREAD:THREAD FINISHED values: NIL {A72C609}>
>>
>> but the "hello world" part goes to the --dribble-file on the remote  
>> machine.
>> Is it possible to have that on the REPL too?
>
> You could bind the output stream lexically:
>
> CL-USER> (let ((s *standard-output*))
>             (sb-thread:make-thread (lambda () (format s "hello  
> world"))))
> #<SB-THREAD:THREAD RUNNING {15833191}>
> hello world
> CL-USER>

Alternatively you could set swank:*globally-redirect-io* or
swank:*default-worker-thread-bindings*.

Helmut.





More information about the slime-devel mailing list