[sr-dev] git:master:5555e893: mqueue: use local variable to lock early only when needed