FYI There is indeed a memory leak on a circular reference.

import gc
import resource
import stackless
import weakref
gc.disable()
resource.setrlimit(resource.RLIMIT_AS, (200 << 20, 200 << 20))  # 200 MB
while True:
  t = stackless.tasklet(stackless.schedule)()
  assert t.alive
  stackless.schedule()
  assert t.alive
  assert t is t.tempval  # Circular reference: t --> t.tempval --> t
  t.remove()

Solution to avoid using unnecessary memory: always call
stackless.schedule(None) instead of stackless.schedule(); also for
stackless.schedule_remove().
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to