[racket] Continue: reentrant promises and custodian suicides

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Thu Jul 14 11:58:22 EDT 2011

On 07/14/2011 09:30 AM, Eli Barzilay wrote:
> 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.

Yes, from the docs it looks like delay/sync is probably what I want.


Posted on the users mailing list.