CLN: clean up
ENH: put a lock on ensure_clean