[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: continuations and threads
> Certainly, it has never been The Scheme Way to cripple a nice
> interface to accomodate a particular implementation strategy ---
> especially one as twisted as this one --- so I'm not suggesting that
> Marc should change the SRFI.
Hmmm, that sounds like you *are* asking me to change the SRFI... ;-)
> However, I think this problem will be
> common to Scheme systems intended to work closely with C code, so I
> thought I'd mention it.
That's not a problem with Gambit-C. I'm not sure if it is a problem
with other implementions that compile to C like Bigloo and MzScheme.
> I think this is pretty gross, but it does allow a natural
> correspondence between C function calls and Scheme function calls:
> continuations preserve active calls to C functions, as well as Scheme
> functions. If it's important to your users to be able to write C
> functions that can call and be called by Scheme functions, I think
> this is a plausible implementation choice. I'm not aware of any other
> implementation that does this while requiring so little distortion of
> your C code. (But if you know of one, I'd love to hear about it!)
There is another way (I have not implemented it yet though)... but it
is too complex to describe at this hour of the night!