• Chris McDonough's avatar
    - "Bucket finalization" is now done more aggressively. Instead of waiting · d62a0d18
    Chris McDonough authored
      until a bucket is garbage collected (which may be much later than the
      expiration of that bucket), we "finalize" a bucket as soon as possible
      after it gets expired.  This effectively means that the "delete notifier"
      will be called much closer to the time that a transient object actually
      expires.
                                                                                    
    - Add a "_last_finalized_timeslice" counter; this counter keeps track of 
      the bucket which was finalized last.  Set the initial value of
      "_last_finalized_timeslice" to -period; this services the unit tests for
      finalization, where there can actually be a timeslice that is 0 and we 
       need to finalize that bucket.
                                                                                    
    - Add a series of locks to prevent finalization, replentishment, and
      garbage collection from being attempted by more than one thread
      simultaneously.
                                                                                    
    - Add "Fake" module for interactive testing purposes (swap out BTree for
      simpler object during stress tests for isolation purposes).
                                                                                    
    - Allow DATA_CLASS to be specified (this is the main data structure
      class).
    
    - Update docs and tests to account for new finalization strategy.
    d62a0d18
Transience.py 35.6 KB