Skip to content

Commit

Permalink
perf: Use CONTINUE_ON_SHUTDOWN task runner to avoid shutdown hang
Browse files Browse the repository at this point in the history
BUG=840743

Change-Id: Ie220fcaaad0204e23dbcc1c935e0aad8c7d0b88f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772848
Reviewed-by: Gabriel Marin <gmx@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691472}
  • Loading branch information
Ryo Hashimoto authored and Commit Bot committed Aug 29, 2019
1 parent 0d8e4c4 commit 7cd8eff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions chrome/browser/metrics/perf/perf_output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ PerfOutputCall::PerfOutputCall(base::TimeDelta duration,
pending_stop_(false) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

perf_data_pipe_reader_ = std::make_unique<chromeos::PipeReader>(
base::CreateTaskRunner({base::ThreadPool(), base::MayBlock(),
base::TaskPriority::USER_VISIBLE}));
perf_data_pipe_reader_ =
std::make_unique<chromeos::PipeReader>(base::CreateTaskRunner(
{base::ThreadPool(), base::MayBlock(),
base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}));

base::ScopedFD pipe_write_end =
perf_data_pipe_reader_->StartIO(base::BindOnce(
Expand Down

0 comments on commit 7cd8eff

Please sign in to comment.