Revision 5685c1a5
ID | 5685c1a56ccc0a7c9d928bbf8ed5254957733de7 |
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
Files
- added
- modified
- copied
- renamed
- deleted