Skip to content

Commit

Permalink
Adding logger pri (#14155)
Browse files Browse the repository at this point in the history
  • Loading branch information
n8schloss authored and acdlite committed Nov 8, 2018
1 parent 3d8bda7 commit 7c56013
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/scheduler/src/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var IdlePriority = 4;
var LowPriority = 4;
var IdlePriority = 5;

// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
Expand All @@ -24,6 +25,7 @@ var IMMEDIATE_PRIORITY_TIMEOUT = -1;
// Eventually times out
var USER_BLOCKING_PRIORITY = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000;
// Never times out
var IDLE_PRIORITY = maxSigned31BitInt;

Expand Down Expand Up @@ -220,6 +222,7 @@ function unstable_runWithPriority(priorityLevel, eventHandler) {
case ImmediatePriority:
case UserBlockingPriority:
case NormalPriority:
case LowPriority:
case IdlePriority:
break;
default:
Expand Down Expand Up @@ -284,6 +287,9 @@ function unstable_scheduleCallback(callback, deprecated_options) {
case IdlePriority:
expirationTime = startTime + IDLE_PRIORITY;
break;
case LowPriority:
expirationTime = startTime + LOW_PRIORITY_TIMEOUT;
break;
case NormalPriority:
default:
expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
Expand Down Expand Up @@ -655,6 +661,7 @@ export {
UserBlockingPriority as unstable_UserBlockingPriority,
NormalPriority as unstable_NormalPriority,
IdlePriority as unstable_IdlePriority,
LowPriority as unstable_LowPriority,
unstable_runWithPriority,
unstable_scheduleCallback,
unstable_cancelCallback,
Expand Down

0 comments on commit 7c56013

Please sign in to comment.