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/07/30 04:48] (current) carl
Line 34: Line 34:
   * For socket fds, reconnecting causes the remote endpoint to burn resources as well.   * For socket fds, reconnecting causes the remote endpoint to burn resources as well.
   * For file fds, its not possible to synchronize access to them.  (if Python had better shared memory support and the correct atomics to modify the memory, this may be possible).   * For file fds, its not possible to synchronize access to them.  (if Python had better shared memory support and the correct atomics to modify the memory, this may be possible).
 +
 +
 +==== Problems with Multi Interpreters ====
 +Very few Python modules support it.  It's hard to tell which ones do support it, and the support seems arbitrary.
  
  
Line 52: Line 56:
  
 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