diff options
| -rw-r--r-- | CHANGES.rst | 2 | ||||
| -rw-r--r-- | src/werkzeug/routing.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 22baeae0..229abd30 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -92,6 +92,8 @@ Unreleased properties to the ``Request`` and ``Response`` wrappers. :pr:`1699` - ``Accept`` values are no longer ordered alphabetically for equal quality tags. Instead the initial order is preserved. :issue:`1686` +- Added Map.lock_class attribute for alternative + implementations. :pr:`1702` Version 0.16.1 diff --git a/src/werkzeug/routing.py b/src/werkzeug/routing.py index aa07892c..fa71e698 100644 --- a/src/werkzeug/routing.py +++ b/src/werkzeug/routing.py @@ -1372,6 +1372,10 @@ class Map(object): #: A dict of default converters to be used. default_converters = ImmutableDict(DEFAULT_CONVERTERS) + #: The type of lock to use when updating. + #: .. versionadded:: 1.0 + lock_class = Lock + def __init__( self, rules=None, @@ -1389,7 +1393,7 @@ class Map(object): self._rules = [] self._rules_by_endpoint = {} self._remap = True - self._remap_lock = Lock() + self._remap_lock = self.lock_class() self.default_subdomain = default_subdomain self.charset = charset |
