It may be worth adding a comment on why WeakValueDictionary is used, and where the references to slots are kept (_process_queue scheduled call, since it's far from obvious.