Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3347)

Unified Diff: base/task_scheduler/task_scheduler_impl.cc

Issue 2520153003: Use TIMER_SLACK_MAXIMUM on the TaskScheduler service thread. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler_impl.cc
diff --git a/base/task_scheduler/task_scheduler_impl.cc b/base/task_scheduler/task_scheduler_impl.cc
index 708685d68d66316556591488e91c7e55e1b5bd75..701616e33d00a5a43d8e44bcc63b0152b2e6377e 100644
--- a/base/task_scheduler/task_scheduler_impl.cc
+++ b/base/task_scheduler/task_scheduler_impl.cc
@@ -116,15 +116,15 @@ void TaskSchedulerImpl::Initialize(
// Start the service thread. On platforms that support it (POSIX except NaCL
// SFI), the service thread runs a MessageLoopForIO which is used to support
// FileDescriptorWatcher in the scope in which tasks run.
- constexpr MessageLoop::Type kServiceThreadMessageLoopType =
+ Thread::Options service_thread_options;
+ service_thread_options.message_loop_type =
#if defined(OS_POSIX) && !defined(OS_NACL_SFI)
MessageLoop::TYPE_IO;
#else
MessageLoop::TYPE_DEFAULT;
#endif
- constexpr size_t kDefaultStackSize = 0;
- CHECK(service_thread_.StartWithOptions(
- Thread::Options(kServiceThreadMessageLoopType, kDefaultStackSize)));
+ service_thread_options.timer_slack = TIMER_SLACK_MAXIMUM;
+ CHECK(service_thread_.StartWithOptions(service_thread_options));
// Instantiate TaskTracker. Needs to happen after starting the service thread
// to get its message_loop().
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698