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
Next revision
Previous revision
python [2025/10/16 20:42] carlpython [2026/04/01 20:31] (current) carl
Line 52: Line 52:
  
 In this, if a or b have side-effects on evaluation, like throwing an exception, the order in which a and b are invoked matters. In this, if a or b have side-effects on evaluation, like throwing an exception, the order in which a and b are invoked matters.
 +
 +
 +==== Futures ====
 +
 +  * 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.1760647349.txt.gz · Last modified: by carl