collector: Using contextmanager with SingleLock