Exemple #1
0
 def __init__(self):
     self.clear()
     
     # Run self.expire_cache in a separate daemon thread.
     t = threading.Thread(target=self.expire_cache, name='expire_cache')
     self.expiration_thread = t
     set_daemon(t, True)
     t.start()
Exemple #2
0
    def __init__(self):
        self.clear()

        # Run self.expire_cache in a separate daemon thread.
        t = threading.Thread(target=self.expire_cache, name='expire_cache')
        self.expiration_thread = t
        set_daemon(t, True)
        t.start()