Skip to content

Commit

Permalink
delete callback while holding WorkSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth committed Aug 16, 2023
1 parent 54ff7fa commit 5f0c8b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/lib/gprpp/work_serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ void WorkSerializer::WorkSerializerImpl::Run(std::function<void()> callback,
gpr_log(GPR_INFO, " Executing immediately");
}
callback();
callback = nullptr; // Delete while still holding WorkSerializer.
DrainQueueOwned();
#ifndef NDEBUG
current_thread_ = std::thread::id();
Expand Down

0 comments on commit 5f0c8b6

Please sign in to comment.