[racket] Continue: reentrant promises and custodian suicides

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Jul 14 11:30:22 EDT 2011

10 minutes ago, Ryan Culpepper wrote:
> On 07/14/2011 08:31 AM, Dominic Pearson wrote:
> > Hello folks!
> >
> > I have been writing an application in Racket using Continue, and have
> > been stress testing it in the early development phase using `siege', to
> > see if it is suitable for future heavy lifting.
> >
> > Under high load I get some very odd messages. Requests sometimes fail
> > with
> >
> > 	force: reentrant promise fun-p
> Those look like they're from ryanc/db. I suspect you see them at the
> very beginning, before the "lazy requires" (which are implemented
> with promises) have been forced.
> I'll replace the promises with something that avoids the reentrant
> check, since it's unnecessary for my purposes.

Note: (a) there's `delay/sync', which still produces a promise.
(b) the reentrance check is, surprisingly, not an extra cost -- it
makes efficient composable promises possible.

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

Posted on the users mailing list.