« Previous | Next » 

Revision 5685c1a5


Added by Michael Hanselmann almost 16 years ago

jqueue: Replace normal cache dict with weakref dict

A job should only exist once in memory. After the cache is cleaned,
there can still be references to a job somewhere else. If there
are multiple instances, one can get updated while a function is
waiting for changes on another instance. By using
weakref.WeakValueDictionary, which automatically removes instances as
soon as there are no strong references to it anymore, we can solve
this problem.

Reviewed-by: iustinp


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences