Protect several local variables from concurrent access