[Openmcl-devel] stdout from called C funcs while using IDE
Raffael Cavallaro
raffaelcavallaro at mac.com
Mon Apr 6 17:20:53 PDT 2009
On Apr 6, 2009, at 6:11 PM, Paul Krueger wrote:
> I'm running the Cocoa IDE for CCL under Leopard.
This is not directly related to your issue, but I find it useful in
the IDE when testing/degugging multi-threaded code to be able to send
output to the IDE listener. I'm sure Gary or someone else from Clozure
will correct me if this is a bad idea, but I've been doing this:
(define-symbol-macro *listener-output*
(hemlock-ext::top-listener-output-stream))
which allows things like
(process-run-function "whatever"
(lambda ()
(let ((result (something-time-consuming-on-
another-thread)))
(format *listener-output* "result is ~a~
%" result))))
Of course if one does this the output from multiple threads will be
unpredictably interleaved in the listener.
regards,
Ralph
Raffael Cavallaro, Ph.D.
raffaelcavallaro at mac.com
More information about the Openmcl-devel
mailing list