@@ -275,7 +275,7 @@ Pipe::Pipe(ExecPlan* plan, std::string pipe_name,
275275const Ordering& Pipe::ordering () const { return ordering_; }
276276
277277void Pipe::Pause (PipeSource* output, int counter) {
278- std::lock_guard<std::mutex> lg ( mutex_);
278+ auto lock = mutex_. Lock ( );
279279 auto & state = state_[output];
280280 if (state.backpressure_counter < counter) {
281281 if (!state.paused && !state.stopped ) {
@@ -295,7 +295,7 @@ void Pipe::Pause(PipeSource* output, int counter) {
295295}
296296
297297void Pipe::Resume (PipeSource* output, int counter) {
298- std::lock_guard<std::mutex> lg ( mutex_);
298+ auto lock = mutex_. Lock ( );
299299 auto & state = state_[output];
300300 if (state.backpressure_counter < counter) {
301301 state.backpressure_counter = counter;
@@ -320,7 +320,7 @@ void Pipe::DoResume(SourceState& state) {
320320}
321321
322322Status Pipe::StopProducing (PipeSource* output) {
323- std::lock_guard<std::mutex> lg ( mutex_);
323+ auto lock = mutex_. Lock ( );
324324 auto & state = state_[output];
325325 DCHECK (!state.stopped );
326326 DoResume (state);
@@ -341,7 +341,7 @@ Status Pipe::StopProducing(PipeSource* output) {
341341Status Pipe::InputReceived (ExecBatch batch) {
342342 for (auto & source_node : async_nodes_) {
343343 {
344- std::lock_guard<std::mutex> lg ( mutex_);
344+ auto lock = mutex_. Lock ( );
345345 if (state_[source_node].stopped ) continue ;
346346 }
347347 plan_->query_context ()->ScheduleTask (
0 commit comments