[racket] call-with-timeout

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Nov 15 17:43:15 EST 2013

10 minutes ago, Neil Van Dyke wrote:
> Eli Barzilay wrote at 11/15/2013 05:18 PM:
> > Not a direct answer -- but did you consider `call-with-limits'?
> 
> I don't know how reliable limits are, nor how they'd interact with
> the other complexity of this system uses.

They should be pretty reliable, since they're used to implement
sandboxed limits.  You can also look at the implementation and see the
little pile of tricky things you need to do to get it to work.  Your
case should be relatively simple, since you don't use memory limits.


> (And I thought I'd heard people complain before about limits not
> seeming to be enforced as they'd expect.)

I don't remember concrete bugs that were raised -- but one thing that
leads to such reports is that it's tricky to deal with memory issues.
Eg, you think that you limit memory, but it turns out that you have a
bunch of object that are referenced somewhere outside of the custodian
too so it's not killed when expected.  (And you're probably referring
to the semi-recent "call-with-limits memory bound isn't actually
bounding memory usage" thread which was exactly this kind of thing.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.