-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
expose a way to use a custom/external microTask impl #439
Comments
Just for the record: this is a fantastic piece of software and in my 20+ years as a developer I have rarely seen modules as efficient, pure, well thought of and fun to use as uPlot. Thank you! |
thanks! glad you're enjoying it :)
unfortunately, i'm far from an event loop expert. i thought maybe this might help, but i don't think it does: feross/queue-microtask#2 (comment) |
I tried it but you are right, it doesn't help: obviously What whould be really helpful is if you allowed for configuration of |
💯 , feel free to PR this. (plz leave the builds out of the PR for easier review, i'll build post-merge) |
hey @maxhq if you still need this, please open a PR. i'm gonna close this out for now as i don't plan to add it since this is the only request i've encountered since switching to async batching. |
The use of a Promise for
microTask()
prevents user code from catching any errors that might occur in the function passed tomicroTask()
- i.e.commit()
.This happens e.g. if the
data
Array contains less entries than whatopts.series
define.The problem can easily be shown by this code:
I cannot think of an easy solution other than turning uPlot itself into a Promise. But it's late and I'm tired and there might be an easy solution :)
The text was updated successfully, but these errors were encountered: