[plt-scheme] Cleanup on servlet timeout

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jul 28 18:53:48 EDT 2008

At Mon, 28 Jul 2008 15:10:36 -0400, "Henk Boom" wrote:
> On 2008-07-28, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > That's correct. It's an unsafe operation and normally makes sense when
> >  you're already using the FFI, so it's left to the FFI.
> 
> But not the lib/foreign FFI?

Yes, use `scheme/foreign' with

 (define add-managed
   (get-ffi-obj "scheme_add_managed" #f
                (_fun _scheme ; custodian
                      _scheme ; managed object
                      (_fun _scheme _scheme -> _bool)
                      _scheme ; data to pass as 2nd argument -- not useful
                      _bool   ; provide #t, normally
                      -> _pointer)))


Matthew



Posted on the users mailing list.