-
Notifications
You must be signed in to change notification settings - Fork 78
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
What does Google think of async_wrap in the browser? #9
Comments
Is there some light(heavy?) reading you can point me at to help me understand async wrap better? I got the crash course in the vc a few weeks ago, but it was super high level so I don't think I can quite yet provide feedback one way or another. :) |
Roughly, it works something like this:
Inside the Now, the first two can mostly be achieved through something like trace_event. Implementing something like continuation-local-storage, however, requires active interaction with the code being traced. This is super useful for things like tracing user behaviour. Currently this requires huge, ugly hacks like zone.js to monkey-patch the world. Even if you are only interested in a couple particular things, you still have to patch everything because the event loop will jump between tasks and you will lose track of the last relevant parent call to find your context object. What I am hoping for is for browsers to adopt a similar concept to async_wrap, such that one could at least have an id assigned to each synchronous context and have all callbacks link back to their appropriate parent context somehow. That way the call tree could be traversed to find the last relevant parent id and link directly to that without needing to care about any of the things that happened between the two. |
closing old AsyncWrap issues, please start a new thread if appropriate |
Part of my efforts with async_wrap are to consolidate async boundary linking between node/io.js and the browser. I'm wondering if the WG participants from Google have any comments/insight/interest to share in the idea of an async_wrap-like thing in the browser.
I'd like to see a standardized interface (in more than just Chrome) to track exits and returns to JavaScript-land from async calls. Is this a thing Google is already thinking about? Implementing? Using internally? Would people even want it in the browser? Is there valuable insight to be had from either Google or the iojs team?
@natduca @ofrobots
The text was updated successfully, but these errors were encountered: