"locked" must be a "module" global (local to thread)