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

Unified Diff: Source/platform/scheduler/Scheduler.h

Issue 971283002: Add canExceedIdleDeadlineIfRequired function to Scheduler and use it in Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Typo Created 5 years, 9 months 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 | « Source/platform/heap/ThreadState.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/Scheduler.h
diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h
index 2a7d84b268c3f5ea7800edee3e816689b35412a9..63e7a6825bac8d4de716c6e727c07151cc847ef0 100644
--- a/Source/platform/scheduler/Scheduler.h
+++ b/Source/platform/scheduler/Scheduler.h
@@ -46,6 +46,16 @@ public:
// Must be called on the main thread.
bool shouldYieldForHighPriorityWork() const;
+ // Returns true if a currently running idle task could exceed its deadline
+ // without impacting user experience too much. This should only be used if
+ // there is a task which cannot be pre-empted and is likely to take longer
+ // than the largest expected idle task deadline. It should NOT be polled to
+ // check whether more work can be performed on the current idle task after
+ // its deadline has expired - post a new idle task for the continuation of
+ // the work in this case.
+ // Must be called from the main thread.
+ bool canExceedIdleDeadlineIfRequired() const;
+
protected:
Scheduler(WebScheduler*);
virtual ~Scheduler();
« no previous file with comments | « Source/platform/heap/ThreadState.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698