[Ur] howto register cleanup which is neither uw_malloc nor transactional?
Adam Chlipala
adamc at impredicative.com
Sat Dec 4 11:19:24 EST 2010
Adam Chlipala wrote:
> Adam Chlipala wrote:
>> Marc Weber wrote:
>>> - one callback to clear the cache (eg of http requests) after a request
>>> stops being executed which is called in all cases:
>>> * retried too often, fatal, or success
>>
>> These both seem like straightforward uses of the "free" callback
>> passed to uw_register_transactional().
>
> On second thought, I didn't read the question carefully enough. You
> would probably want a small modification where the "free" callback is
> passed an argument explaining which kind of request termination
> triggered this. I can add that.
OK, I've added a new argument to the "free" callback which is a simple
boolean flag telling whether a retry is expected afterward. (This is in
the public repo.)
More information about the Ur
mailing list