{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/1019","repository_url":"https://api.github.com/repos/svaarala/duktape","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/1019/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/1019/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/1019/events","html_url":"https://github.com/svaarala/duktape/pull/1019","id":183277249,"number":1019,"title":"Implement ES6 Promise support","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[{"id":238834241,"url":"https://api.github.com/repos/svaarala/duktape/labels/es6","name":"es6","color":"bfe5bf","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2016-10-16T16:53:33Z","updated_at":"2016-10-27T18:40:02Z","closed_at":"2016-10-27T14:58:15Z","pull_request":{"url":"https://api.github.com/repos/svaarala/duktape/pulls/1019","html_url":"https://github.com/svaarala/duktape/pull/1019","diff_url":"https://github.com/svaarala/duktape/pull/1019.diff","patch_url":"https://github.com/svaarala/duktape/pull/1019.patch"},"body":"_Work in progress._\r\n\r\nImplement support for ES6+ Promises.  Promises allow async code to be written in a linear fashion like sync code.\r\n\r\nChecklist:\r\n- [ ] Implement `Promise`, all ES7 bindings\r\n- [ ] C API for promises?\r\n- [ ] `Promise.prototype.done()`?  Investigate pros and cons, as many devs dislike it\r\n- [ ] If async resolve implemented here, need an API to dispatch Jobs, e.g. `duk_perform_jobs()`\r\n- [ ] Testcases\r\n- [ ] RELEASES entry"},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/256732496","html_url":"https://github.com/svaarala/duktape/pull/1019#issuecomment-256732496","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/1019","id":256732496,"user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T18:40:02Z","updated_at":"2016-10-27T18:40:02Z","body":"Ok, sounds good.\r\n\r\nRe: that eventloop thing, it'd be interesting to figure out if the need for an event queue could be generalized to some extent so that it would handle Promises but would also make it easy to integrate timers and maybe user custom events into the same mechanism. The event queue model is also used by browsers so while it's not a part of the core Ecmascript model, it's still fairly common.\r\n\r\nFor the C API there's maybe be an API call to handle one queued event or indicate all events are done. There would also need to be a way to push events-to-be-handled into the queue, preferably from C code (which would be exercised by the Promise implementation)."}}
{"actor":{"display_login":"svaarala"}}