On Fri, Apr 24, 2015 at 6:31 AM, George Neuner <gneun...@comcast.net> wrote:
> On 4/23/2015 1:45 PM, Jay McCarthy wrote:
>>
>> On Thu, Apr 23, 2015 at 1:35 PM, David Vanderson
>> <david.vander...@gmail.com> wrote:
>>
>> > Jay - is there any connection between a saved continuation and the
>> > thread
>> > that created it?
>>
>> The values of the parameters are saved in the continuation and
>> inherited from the thread.
>
>
> That's going to be a problem because there's a large amount of state - not
> simply control variables, but also an open database connection and a complex
> dynamic database query that is expensive to re-execute.  Many clients may be
> simultaneously executing separate instances of the query - if I can't keep
> the database connection open, I can't use per client temporary tables to
> cache results and will have to do something ugly with a permanent table.
>

I'm surprised that you use so many parameters:
http://docs.racket-lang.org/guide/parameterize.html?q=parameter#%28tech._parameter%29

> On Thu, Apr 23, 2015 at 1:35 PM, David Vanderson
> <david.vander...@gmail.com> wrote:
>
>>> What I'd like, though, is for it to wake up again and log some exit data
>>> when all continuations expire.
>>
>> I'm not sure I understand the motivation here.  Can you give an example of
>> the kind of exit data you want to log?
>
>
> After I wrote that I had started to think maybe I don't really need the exit
> log ... but, If I can't keep the database connection open, then I have to
> know when the thread terminates so I can clean up cached query results that
> are cluttering a permanent table.  Or spawn a top level thread to
> periodically clean out expired results.
>
> Solutions that involve permanent cache tables are not particularly nice.
>
> George



-- 
Jay McCarthy
http://jeapostrophe.github.io

           "Wherefore, be not weary in well-doing,
      for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
                          - D&C 64:33

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to