Only setting the state should require a lock.