I'm evaluating using Gambit-C Scheme as a scripting type language within my application.  The main app is written in C++ and I've got the C++ -> Scheme -> C++ calls all working.  That was all straightforward and I'm pretty happy with that.  I'm now trying to integrate swank and have hit a bit of a dead end.  I can run swank-gambit on its own and it just worked, the problem has come trying to run it  alongside the thread that communicates with the host C++ app.  I've tried replacing the code at the bottom of swank-gambit.scm with the following based on the iOS sample.  This creates a new thread that returns to the C++ host, while the primordial thread creates the swank server.<br>
<br><span style="font-family: courier new,monospace;">(continuation-capture</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(lambda (cont)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">   (thread-start!</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    (make-thread</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">     (lambda ()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       (continuation-return cont #f))))</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   ;; the primordial thread is running this...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">   (swank-server-register!)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   (thread-sleep! +inf.0)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   exit)))</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br><br>That works in as much as it creates the tcp listen port and slime can connect to it, however it seems that the connection is rarely if ever serviced.  The calls between C++ and Scheme in the other thread all continue ok.  Can someone point me in the direction I need to fix this please?  I suspect I've got a fundamentally wrong understanding of swank or the whole Gambit threading model.  Do I somehow need to provide execution time to the primordial thread?<br>
<br>Roger.<br>