{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/promises/issues/9","repository_url":"https://api.github.com/repos/nodejs/promises","labels_url":"https://api.github.com/repos/nodejs/promises/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/promises/issues/9/comments","events_url":"https://api.github.com/repos/nodejs/promises/issues/9/events","html_url":"https://github.com/nodejs/promises/issues/9","id":133801071,"number":9,"title":"AsyncWrap","user":{"login":"petkaantonov","id":829734,"avatar_url":"https://avatars.githubusercontent.com/u/829734?v=3","gravatar_id":"","url":"https://api.github.com/users/petkaantonov","html_url":"https://github.com/petkaantonov","followers_url":"https://api.github.com/users/petkaantonov/followers","following_url":"https://api.github.com/users/petkaantonov/following{/other_user}","gists_url":"https://api.github.com/users/petkaantonov/gists{/gist_id}","starred_url":"https://api.github.com/users/petkaantonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petkaantonov/subscriptions","organizations_url":"https://api.github.com/users/petkaantonov/orgs","repos_url":"https://api.github.com/users/petkaantonov/repos","events_url":"https://api.github.com/users/petkaantonov/events{/privacy}","received_events_url":"https://api.github.com/users/petkaantonov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/promises/labels/blocks-unflagging","name":"blocks-unflagging","color":"fbca04"},{"url":"https://api.github.com/repos/nodejs/promises/labels/concerns-core-apis","name":"concerns-core-apis","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-02-15T19:48:15Z","updated_at":"2016-09-08T20:18:39Z","closed_at":null,"body":"Native promises don't have hooks in V8 so interop with AsyncWrap is non-trivial.\r\n\r\n- Should it block the PR?\r\n- Should it block unflagging?\r\n- Should it be hacked in, patched in v8 or making our own floating patch etc?\r\n\r\n@trevnorris \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nodejs/promises/issues/comments/245726616","html_url":"https://github.com/nodejs/promises/issues/9#issuecomment-245726616","issue_url":"https://api.github.com/repos/nodejs/promises/issues/9","id":245726616,"user":{"login":"trevnorris","id":289174,"avatar_url":"https://avatars.githubusercontent.com/u/289174?v=3","gravatar_id":"","url":"https://api.github.com/users/trevnorris","html_url":"https://github.com/trevnorris","followers_url":"https://api.github.com/users/trevnorris/followers","following_url":"https://api.github.com/users/trevnorris/following{/other_user}","gists_url":"https://api.github.com/users/trevnorris/gists{/gist_id}","starred_url":"https://api.github.com/users/trevnorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevnorris/subscriptions","organizations_url":"https://api.github.com/users/trevnorris/orgs","repos_url":"https://api.github.com/users/trevnorris/repos","events_url":"https://api.github.com/users/trevnorris/events{/privacy}","received_events_url":"https://api.github.com/users/trevnorris/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T20:18:38Z","updated_at":"2016-09-08T20:18:38Z","body":"@omsmith Thanks for the feedback. While revising my model of how Promises should work with async hooks I decided to model it on how callbacks, and events, are currently evaluated. While doing so I realized that it may need to be better communicated that `AsyncWrap` exists to track handle ownership. e.g. how did this handle come to exist?\r\n\r\nLet's take a quick look at node's API as an reference:\r\n\r\n```js\r\nlet server = null;\r\n\r\nsetTimeout(function timer01() {\r\n  server = net.createServer().listen(8080);\r\n}, 10);\r\n\r\nsetTimeout(function timer02() {\r\n  server.on('connection', c => {\r\n    print('connection made');\r\n  });\r\n}, 100);\r\n```\r\n\r\nBoth `timer01` and `timer02` will have their own unique id. `server` will have the `parentId` of `timer01()`. Now when the `'connection'` event fires a `TCPWrap` is created. Thus triggering `init()` to be called. Would you expect the `parentId` passed to the `init()` of that new connection to be that of the `server` or `timer02`?\r\n\r\nThus far the API has evaluated the `parentId` as the handle responsible for the new class' construction. In this case that would be `server`. Before we proceed to discuss Promises, is that how you'd expect async hooks to work?"}}
{"actor":{"display_login":"trevnorris"}}