4 Commits

Author SHA1 Message Date
Joshua Harlow
19f07c600c Add a TODO for retrying pull request #20
Sometime in a future retrying version there will
likely/hopefully exist a ability to more easily
filter on specific exceptions; this commit adds a
note to the upstream pull request that may add this
feature.

Change-Id: I44f1c9fe4fbbd5f77032ca7bfff4e2e6b7ff7622
2014-11-25 14:09:06 -08:00
Joshua Harlow
46c836ee28 Allow the lock delay to be provided
When a lock can't be acquired there is currently a hard coded
delay (0.01) that is used before trying again, instead of having
a hard coded delay we should allow this delay to be configured
since having it set at a hard coded value can limit concurrency (if
the delay is actually way to high) or cause to much contention (if
the delay is actually way to low).

This review adds on that logic and also uses the retrying library
to perform the acquisition attempts (and associated failures when/if
they occur); as well as shows logs after a given amount of time has
elapsed with the logs being output at a given periodicity.

Change-Id: Ideeefba1439ddd677c608d01becb4f6a0d4bc83d
2014-11-20 22:09:45 -08:00
Joshua Harlow
3bda65ccbb Allow for providing a customized semaphore container
It can be undesirable to have a globally shared sempahore
container, especially since oslo.concurrency can now be shared
among many disjoint applications and libraries.

When a single container is used it is now possible to have those
disjoint applications/libraries collide on the same sempahore names.
This is not a good pattern to continue with, so in order to move away
from it allow a custom container to be provided (which defaults to the
existing global one) so that users of oslo.concurrency may provide there
own container if they so desire.

Change-Id: I9aab42e21ba0f52997de3e7c9b0fea51db5c7289
2014-11-19 17:15:40 -08:00
Doug Hellmann
bca4a0d827 Move out of the oslo namespace package
Move the public API out of oslo.concurrency to oslo_concurrency. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Change-Id: I20d1647b1c3ef8cab3b69eccfe168eeb01703b72
2014-11-14 17:17:25 -05:00