mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] sqlite3


From: Matt Birkholz
Subject: Re: [MIT-Scheme-devel] sqlite3
Date: Sat, 18 May 2013 12:40:04 -0700

> From: Taylor R Campbell <address@hidden>
> Date: Fri, 17 May 2013 03:13:38 +0000
> 
> [...]
> 
> Scheme48 has a working implementation of this.  When C calls into
> Scheme, it passes Scheme a token and a return-to-c continuation to
> which Scheme must return the token. [...]

That would be cool.  I have often pondered such a scheme, but I would
be anxious to get out of C space and into Scheme.  Thus I would
re-apportion the work thusly:

    C calls into Scheme (as usual).  The Scheme callback-handler notes
    the new state of the C stack, applies the chosen handler (with
    optional thread switching), waits until the C stack has returned
    to the noted state (if necessary), and returns.

There is a little less back-and-forth like "C calls back into Scheme
again saying `nope...'"  And I'm not sure what you mean by "[C] passes
Scheme [...] a return-to-c continuation".  It sounds like the point
between "applies the handler" and "waits until..." -- a continuation
in callback-handler.

I think a slightly more sophisticated callback-handler is all you
need.  Why write *any* more C code? :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]