{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/12980","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/12980/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/12980/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/12980/events","html_url":"https://github.com/nodejs/node/issues/12980","id":228060765,"number":12980,"title":"consider implementing v8::Platform on top of libuv instead of using the default platform","user":{"login":"jeisinger","id":195826,"avatar_url":"https://avatars1.githubusercontent.com/u/195826?v=3","gravatar_id":"","url":"https://api.github.com/users/jeisinger","html_url":"https://github.com/jeisinger","followers_url":"https://api.github.com/users/jeisinger/followers","following_url":"https://api.github.com/users/jeisinger/following{/other_user}","gists_url":"https://api.github.com/users/jeisinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jeisinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeisinger/subscriptions","organizations_url":"https://api.github.com/users/jeisinger/orgs","repos_url":"https://api.github.com/users/jeisinger/repos","events_url":"https://api.github.com/users/jeisinger/events{/privacy}","received_events_url":"https://api.github.com/users/jeisinger/received_events","type":"User","site_admin":false},"labels":[{"id":176191361,"url":"https://api.github.com/repos/nodejs/node/labels/V8%20Engine","name":"V8 Engine","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-05-11T17:08:39Z","updated_at":"2017-05-18T20:53:02Z","closed_at":null,"body":"currently node.js just blocks if there are pending tasks on libuv's message loop before exiting, however, with e.g. WebAssembly's async compile API, it might be the case that there's ongoing work on one of v8::Platform's background threads, and eventually in the future, a task will be posted to the foreground thread to resolve the promise for the compilation.\r\n\r\nIf node.js would implement its own version of v8::Platform instead of relying on the default platform shipped with v8, it would have visibility into the number of on-going tasks, and could wait for the promise to resolve before exiting.\r\n\r\nFrom a cursory look, posting tasks to the main loop of libuv would be easy. I didn't see a way to post delayed tasks? Also, node.js would have to implement its own worker pool.\r\n\r\nThere's no need to implement idle tasks, the platform can just indicate that it doesn't support idle tasks"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/302538023","html_url":"https://github.com/nodejs/node/issues/12980#issuecomment-302538023","issue_url":"https://api.github.com/repos/nodejs/node/issues/12980","id":302538023,"user":{"login":"joshgav","id":4421720,"avatar_url":"https://avatars1.githubusercontent.com/u/4421720?v=3","gravatar_id":"","url":"https://api.github.com/users/joshgav","html_url":"https://github.com/joshgav","followers_url":"https://api.github.com/users/joshgav/followers","following_url":"https://api.github.com/users/joshgav/following{/other_user}","gists_url":"https://api.github.com/users/joshgav/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgav/subscriptions","organizations_url":"https://api.github.com/users/joshgav/orgs","repos_url":"https://api.github.com/users/joshgav/repos","events_url":"https://api.github.com/users/joshgav/events{/privacy}","received_events_url":"https://api.github.com/users/joshgav/received_events","type":"User","site_admin":false},"created_at":"2017-05-18T20:53:02Z","updated_at":"2017-05-18T20:53:02Z","body":"@jeisinger \r\n\r\n> first replace the bundling v8::Platform implementation with a custom node version, and then continue with your shared abstraction plan\r\n\r\nIt's the proposed order that I'm not sure about. We (Node) have been trying to move away from tight coupling to V8 APIs, and writing our own implementation of v8::Platform seems to move us the other way. If we need our own implementation, wouldn't it be better to define a node::Platform (probably a copy of v8::Platform) first and derive from that?"}}
{"actor":{"display_login":"joshgav"}}