Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils.delay: use macro tasks instead of micro tasks. #288

Merged
merged 2 commits into from
Jul 25, 2016

Conversation

dduponchel
Copy link
Collaborator

As says the documentation of asap,

ASAP strives to schedule events to occur before yielding for IO,
reflow, or redrawing.

The goal of async methods in JSZip is to not freeze the browser, a macro task
is a better choice here. See
https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks for a
description of micro/macro tasks.

Fix #280.

As says the documentation of [asap](https://github.com/kriskowal/asap),

> ASAP strives to schedule events to occur before yielding for IO,
> reflow, or redrawing.

The goal of async methods in JSZip is to not freeze the browser, a macro task
is a better choice here. See
https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks for a
description of micro/macro tasks.

Fix Stuk#280.
The stream test was too fragile and randomly broke on some devices.
While trying to debug it, I also improved the reporting of errors in
saucelabs.
@dduponchel
Copy link
Collaborator Author

@CVex2150J could you confirm that this pull request fixes your issue ? I rebuilt the dist/ files on my (temporary) branch fix_280_dist if you need them.

@dduponchel dduponchel merged commit c8b8d2b into Stuk:master Jul 25, 2016
@dduponchel dduponchel deleted the fix_280 branch July 25, 2016 20:11
@dduponchel dduponchel mentioned this pull request Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant