diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-04 12:45:53 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-04 12:45:53 -0400 |
commit | c872e67b9cb0c0aa985da613661a6951b0c99368 (patch) | |
tree | 15a9cb0bdc9551a1adac8d9e9c845b8a2769faf7 /cherrypy/lib/caching.py | |
parent | 3cda35a4148965e048e27b043fdb5401a70e4dd3 (diff) | |
download | cherrypy-git-c872e67b9cb0c0aa985da613661a6951b0c99368.tar.gz |
Remove references to threading._* in Python 3.2 and earlier.
Diffstat (limited to 'cherrypy/lib/caching.py')
-rw-r--r-- | cherrypy/lib/caching.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cherrypy/lib/caching.py b/cherrypy/lib/caching.py index 5d9e5cfb..0db9f3e5 100644 --- a/cherrypy/lib/caching.py +++ b/cherrypy/lib/caching.py @@ -39,7 +39,6 @@ import time import cherrypy from cherrypy.lib import cptools, httputil -from cherrypy._cpcompat import Event class Cache(object): @@ -80,7 +79,7 @@ class AntiStampedeCache(dict): If timeout is None, no waiting is performed nor sentinels used. """ value = self.get(key) - if isinstance(value, Event): + if isinstance(value, threading.Event): if timeout is None: # Ignore the other thread and recalc it ourselves. if debug: @@ -120,7 +119,7 @@ class AntiStampedeCache(dict): """Set the cached value for the given key.""" existing = self.get(key) dict.__setitem__(self, key, value) - if isinstance(existing, Event): + if isinstance(existing, threading.Event): # Set Event.result so other threads waiting on it have # immediate access without needing to poll the cache again. existing.result = value |