User Tools

Site Tools


python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
python [2026/01/12 18:13] carlpython [2026/04/01 20:31] (current) carl
Line 57: Line 57:
  
   * Futures don't have a getstate() method.  This means trying to find out the running/finished/cancel/pending states of a future are racy.   The lock (condition) on the future is also private, so it's not safe to lock and query each of the state methods.   * Futures don't have a getstate() method.  This means trying to find out the running/finished/cancel/pending states of a future are racy.   The lock (condition) on the future is also private, so it's not safe to lock and query each of the state methods.
 +
 +
 +
 +==== Memory ====
 +
 +Python does not have a compacting garbage collector, so memory allocations eventually fill up RSS.   When a mixture of long lived and short lived objects are allocated around the same time, Python (pymalloc) allocates them possibly in the same arena.  When the short lived object is free, the long lived object holds the arena alive for ever.
python.txt · Last modified: by carl