Skip to content

Commit

Permalink
Move towards simpler scheduler and synchronous app initialization
Browse files Browse the repository at this point in the history
Stop delaying all tasks by a setTimeout.

Stop having a special case for if there is a specific bug in the
scheduler.

Stop counting numSteps of tasks reductions. The limit was high enough
that I suspect very few folks reached it, and I’m not sure it’s the
right way to approach this in browsers.

It may make sense to revive it with some mechanism for “low priority”
tasks that could be done with requestIdleCallback and timeRemaining

Create the app thread and effect manager processes synchronously. This
avoids the need for the starter queue for incoming ports. It also makes
the code for creating the main thread a bit clearer.
  • Loading branch information
evancz committed Jul 13, 2017
1 parent a0d0d16 commit 9fe5efe
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 314 deletions.
4 changes: 2 additions & 2 deletions hints/10.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ If you let their support team know about this error, please give them a link to

## Info for Developers

Your application is triggering a bug in the `Task` module of this library! The root cause may be in your code or in a dependency.
Your application is running into a bug in `elm-lang/virtual-dom` at some point. The root cause may be in your code or in a dependency.

Try to reproduce the issue in dev mode. From there, create an [SSCCE](http://sscce.org/) that reproduces the issue and report it [here](https://github.com/elm-lang/core/issues) with a title like “Scheduler bug: ...” and a description that explains your understanding of the problem.
Try to reproduce the issue in dev mode. From there, create an [SSCCE](http://sscce.org/) that reproduces the issue and report it [here](https://github.com/elm-lang/virtual-dom/issues) with a title like “Implementation bug: ...” and a description that explains your understanding of the problem.

Hopefully that helps!
16 changes: 0 additions & 16 deletions hints/13.md

This file was deleted.

6 changes: 1 addition & 5 deletions src/Elm/Kernel/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,13 @@ function _Error_throw__DEV(identifier, fact1, fact2, fact3, fact4)
throw new Error('Ran into a `Debug.crash` in module `' + moduleName + '`\n\nThis was caused by the `case` expression ' + _Error_regionToString(region) + '.\nOne of the branches ended with a crash and the following value got through:\n\n ' + __Debug_toString(value) + '\n\nThe message provided by the code author is:\n\n ' + message);

case 10:
var tagName = fact1;
throw new Error('Scheduler failed on unknown task ' + tagName);
throw new Error('Bug in https://github.com/elm-lang/virtual-dom/issues');

case 11:
throw new Error('Cannot perform mod 0. Division by zero error.');

case 12:
throw new Error('Internal red-black tree invariant violated');

case 13:
throw new Error('Bug in https://github.com/elm-lang/virtual-dom/issues');
}
}

Expand Down
Loading

0 comments on commit 9fe5efe

Please sign in to comment.