Wrap exception raised by backend when releasing lock, and attach generated result to it.

Declined
#1 · Created  · Last updated

Declined pull request

After some thought, this use case is indeed some weird, I'm trying to fix it on our end. So I'm cancelling this pull request. @Mike, Thanks so much for your opinions and patience.

Closed by: ·2014-08-01

Description

For #22 of dogpile.cache, aims to raise exception when backend fails to release lock and keep track of generated result at the same time.

  1. Refactor Lock._enter_create.

  2. Add NeedAsyncRegenerationException, which would trigger an async regeneration. It also hold an existing_value for results generated at the moment.

  3. Add LockReleaseException, wraps any exception raised by backend when releasing lock. It also contains results that would be returned if no exception is raised.

0 attachments

0 comments

Loading commits...