mark threads as locked only if 'closed' is set true first