also set has_lock to 0 when a worker starts.