The point of the “proper” locking mechanism is, it won’t work here.
Afaik when using lock.lock, and try, the locked rule will do it’s job as soon as unlocked. see the excellent statement from @rlkoshak: Explain lock() command? - #2 by rlkoshak
But here it should just ignore all sendCommands() for the members as long as the rule is executed.