{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/xhp-lib/pulls/comments/30299403","id":30299403,"diff_hunk":"@@ -23,10 +23,33 @@\n   }\n \n   final public async function asyncToString(): Awaitable<string> {\n+    $that = await $this->__flushSubtree();\n+    return $that->stringify();\n+  }\n+\n+  final private async function __flushElementChildren(): Awaitable<void> {\n+    $children = $this->getChildren();\n+    $awaitables = Map { };\n+    foreach ($children as $idx => $child) {\n+      if ($child instanceof :x:composable-element) {\n+        $child->__transferContext($this->getAllContexts());\n+        $awaitables[$idx] = $child->__flushSubtree();\n+      }\n+    }\n+    if ($awaitables) {\n+      $awaited = await HH\\Asio\\m($awaitables);","path":"src/core/Primitive.php","position":18,"original_position":18,"commit_id":"3f67fcf4573bb2e866c461eef6240a31d6ada086","original_commit_id":"3f67fcf4573bb2e866c461eef6240a31d6ada086","user":{"login":"Swahvay","id":974639,"avatar_url":"https://avatars.githubusercontent.com/u/974639?v=3","gravatar_id":"","url":"https://api.github.com/users/Swahvay","html_url":"https://github.com/Swahvay","followers_url":"https://api.github.com/users/Swahvay/followers","following_url":"https://api.github.com/users/Swahvay/following{/other_user}","gists_url":"https://api.github.com/users/Swahvay/gists{/gist_id}","starred_url":"https://api.github.com/users/Swahvay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swahvay/subscriptions","organizations_url":"https://api.github.com/users/Swahvay/orgs","repos_url":"https://api.github.com/users/Swahvay/repos","events_url":"https://api.github.com/users/Swahvay/events{/privacy}","received_events_url":"https://api.github.com/users/Swahvay/received_events","type":"User","site_admin":false},"body":"What's `HH\\Asio\\m`?","created_at":"2015-05-14T05:51:18Z","updated_at":"2015-05-14T05:51:18Z","html_url":"https://github.com/facebook/xhp-lib/pull/139#discussion_r30299403","pull_request_url":"https://api.github.com/repos/facebook/xhp-lib/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/comments/30299403"},"html":{"href":"https://github.com/facebook/xhp-lib/pull/139#discussion_r30299403"},"pull_request":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/xhp-lib/pulls/139","id":34966806,"html_url":"https://github.com/facebook/xhp-lib/pull/139","diff_url":"https://github.com/facebook/xhp-lib/pull/139.diff","patch_url":"https://github.com/facebook/xhp-lib/pull/139.patch","issue_url":"https://api.github.com/repos/facebook/xhp-lib/issues/139","number":139,"state":"open","locked":false,"title":"Refactor take 2","user":{"login":"fredemmott","id":360927,"avatar_url":"https://avatars.githubusercontent.com/u/360927?v=3","gravatar_id":"","url":"https://api.github.com/users/fredemmott","html_url":"https://github.com/fredemmott","followers_url":"https://api.github.com/users/fredemmott/followers","following_url":"https://api.github.com/users/fredemmott/following{/other_user}","gists_url":"https://api.github.com/users/fredemmott/gists{/gist_id}","starred_url":"https://api.github.com/users/fredemmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredemmott/subscriptions","organizations_url":"https://api.github.com/users/fredemmott/orgs","repos_url":"https://api.github.com/users/fredemmott/repos","events_url":"https://api.github.com/users/fredemmott/events{/privacy}","received_events_url":"https://api.github.com/users/fredemmott/received_events","type":"User","site_admin":false},"body":"- all tests pass, including tests added that failed against previous PR\r\n- every element renders itself and it's children\r\n- all child rendering is async\r\n- so, the XHP tree becomes a corresponding async tree\r\n\r\nThis means that asyncRender() at different depths in the tree can be executing simultaneously.\r\n\r\nThere shouldn't be much of a performance cost, as HHVM should convert things things\r\nto a StaticWaitHandle when XHPAsync isn't being used.\r\n\r\nfixes facebook/xhp-lib#136\r\nfixes facebook/xhp-lib#85","created_at":"2015-05-07T22:57:34Z","updated_at":"2015-05-14T05:51:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"519240b1763b53a9ee0709060b5604c686609da0","assignee":{"login":"Swahvay","id":974639,"avatar_url":"https://avatars.githubusercontent.com/u/974639?v=3","gravatar_id":"","url":"https://api.github.com/users/Swahvay","html_url":"https://github.com/Swahvay","followers_url":"https://api.github.com/users/Swahvay/followers","following_url":"https://api.github.com/users/Swahvay/following{/other_user}","gists_url":"https://api.github.com/users/Swahvay/gists{/gist_id}","starred_url":"https://api.github.com/users/Swahvay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swahvay/subscriptions","organizations_url":"https://api.github.com/users/Swahvay/orgs","repos_url":"https://api.github.com/users/Swahvay/repos","events_url":"https://api.github.com/users/Swahvay/events{/privacy}","received_events_url":"https://api.github.com/users/Swahvay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/xhp-lib/pulls/139/commits","review_comments_url":"https://api.github.com/repos/facebook/xhp-lib/pulls/139/comments","review_comment_url":"https://api.github.com/repos/facebook/xhp-lib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/xhp-lib/issues/139/comments","statuses_url":"https://api.github.com/repos/facebook/xhp-lib/statuses/3f67fcf4573bb2e866c461eef6240a31d6ada086","head":{"label":"fredemmott:refactor-take-2","ref":"refactor-take-2","sha":"3f67fcf4573bb2e866c461eef6240a31d6ada086","user":{"login":"fredemmott","id":360927,"avatar_url":"https://avatars.githubusercontent.com/u/360927?v=3","gravatar_id":"","url":"https://api.github.com/users/fredemmott","html_url":"https://github.com/fredemmott","followers_url":"https://api.github.com/users/fredemmott/followers","following_url":"https://api.github.com/users/fredemmott/following{/other_user}","gists_url":"https://api.github.com/users/fredemmott/gists{/gist_id}","starred_url":"https://api.github.com/users/fredemmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredemmott/subscriptions","organizations_url":"https://api.github.com/users/fredemmott/orgs","repos_url":"https://api.github.com/users/fredemmott/repos","events_url":"https://api.github.com/users/fredemmott/events{/privacy}","received_events_url":"https://api.github.com/users/fredemmott/received_events","type":"User","site_admin":false},"repo":{"id":29990636,"name":"xhp-lib","full_name":"fredemmott/xhp-lib","owner":{"login":"fredemmott","id":360927,"avatar_url":"https://avatars.githubusercontent.com/u/360927?v=3","gravatar_id":"","url":"https://api.github.com/users/fredemmott","html_url":"https://github.com/fredemmott","followers_url":"https://api.github.com/users/fredemmott/followers","following_url":"https://api.github.com/users/fredemmott/following{/other_user}","gists_url":"https://api.github.com/users/fredemmott/gists{/gist_id}","starred_url":"https://api.github.com/users/fredemmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredemmott/subscriptions","organizations_url":"https://api.github.com/users/fredemmott/orgs","repos_url":"https://api.github.com/users/fredemmott/repos","events_url":"https://api.github.com/users/fredemmott/events{/privacy}","received_events_url":"https://api.github.com/users/fredemmott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fredemmott/xhp-lib","description":"Class libraries for XHP, A PHP5 extension and HHVM feature that augments the syntax of the language such that XML document fragments become valid PHP expressions.","fork":true,"url":"https://api.github.com/repos/fredemmott/xhp-lib","forks_url":"https://api.github.com/repos/fredemmott/xhp-lib/forks","keys_url":"https://api.github.com/repos/fredemmott/xhp-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fredemmott/xhp-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fredemmott/xhp-lib/teams","hooks_url":"https://api.github.com/repos/fredemmott/xhp-lib/hooks","issue_events_url":"https://api.github.com/repos/fredemmott/xhp-lib/issues/events{/number}","events_url":"https://api.github.com/repos/fredemmott/xhp-lib/events","assignees_url":"https://api.github.com/repos/fredemmott/xhp-lib/assignees{/user}","branches_url":"https://api.github.com/repos/fredemmott/xhp-lib/branches{/branch}","tags_url":"https://api.github.com/repos/fredemmott/xhp-lib/tags","blobs_url":"https://api.github.com/repos/fredemmott/xhp-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fredemmott/xhp-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fredemmott/xhp-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/fredemmott/xhp-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fredemmott/xhp-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/fredemmott/xhp-lib/languages","stargazers_url":"https://api.github.com/repos/fredemmott/xhp-lib/stargazers","contributors_url":"https://api.github.com/repos/fredemmott/xhp-lib/contributors","subscribers_url":"https://api.github.com/repos/fredemmott/xhp-lib/subscribers","subscription_url":"https://api.github.com/repos/fredemmott/xhp-lib/subscription","commits_url":"https://api.github.com/repos/fredemmott/xhp-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/fredemmott/xhp-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/fredemmott/xhp-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/fredemmott/xhp-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/fredemmott/xhp-lib/contents/{+path}","compare_url":"https://api.github.com/repos/fredemmott/xhp-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fredemmott/xhp-lib/merges","archive_url":"https://api.github.com/repos/fredemmott/xhp-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fredemmott/xhp-lib/downloads","issues_url":"https://api.github.com/repos/fredemmott/xhp-lib/issues{/number}","pulls_url":"https://api.github.com/repos/fredemmott/xhp-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/fredemmott/xhp-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/fredemmott/xhp-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fredemmott/xhp-lib/labels{/name}","releases_url":"https://api.github.com/repos/fredemmott/xhp-lib/releases{/id}","created_at":"2015-01-28T22:04:13Z","updated_at":"2015-01-28T22:04:13Z","pushed_at":"2015-05-07T23:07:56Z","git_url":"git://github.com/fredemmott/xhp-lib.git","ssh_url":"git@github.com:fredemmott/xhp-lib.git","clone_url":"https://github.com/fredemmott/xhp-lib.git","svn_url":"https://github.com/fredemmott/xhp-lib","homepage":"","size":1357,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"62ca772c3f2875bd2573eea0323bc41f129a9331","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":462859,"name":"xhp-lib","full_name":"facebook/xhp-lib","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/xhp-lib","description":"Class libraries for XHP. XHP is a PHP5 extension and HHVM feature that augments the syntax of the language such that XML document fragments become valid PHP expressions.","fork":false,"url":"https://api.github.com/repos/facebook/xhp-lib","forks_url":"https://api.github.com/repos/facebook/xhp-lib/forks","keys_url":"https://api.github.com/repos/facebook/xhp-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/xhp-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/xhp-lib/teams","hooks_url":"https://api.github.com/repos/facebook/xhp-lib/hooks","issue_events_url":"https://api.github.com/repos/facebook/xhp-lib/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/xhp-lib/events","assignees_url":"https://api.github.com/repos/facebook/xhp-lib/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/xhp-lib/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/xhp-lib/tags","blobs_url":"https://api.github.com/repos/facebook/xhp-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/xhp-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/xhp-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/xhp-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/xhp-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/xhp-lib/languages","stargazers_url":"https://api.github.com/repos/facebook/xhp-lib/stargazers","contributors_url":"https://api.github.com/repos/facebook/xhp-lib/contributors","subscribers_url":"https://api.github.com/repos/facebook/xhp-lib/subscribers","subscription_url":"https://api.github.com/repos/facebook/xhp-lib/subscription","commits_url":"https://api.github.com/repos/facebook/xhp-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/xhp-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/xhp-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/xhp-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/xhp-lib/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/xhp-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/xhp-lib/merges","archive_url":"https://api.github.com/repos/facebook/xhp-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/xhp-lib/downloads","issues_url":"https://api.github.com/repos/facebook/xhp-lib/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/xhp-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/xhp-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/xhp-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/xhp-lib/labels{/name}","releases_url":"https://api.github.com/repos/facebook/xhp-lib/releases{/id}","created_at":"2010-01-07T20:20:02Z","updated_at":"2015-05-12T20:10:59Z","pushed_at":"2015-05-08T17:20:15Z","git_url":"git://github.com/facebook/xhp-lib.git","ssh_url":"git@github.com:facebook/xhp-lib.git","clone_url":"https://github.com/facebook/xhp-lib.git","svn_url":"https://github.com/facebook/xhp-lib","homepage":"http://facebook.github.io/xhp-lib/","size":2387,"stargazers_count":980,"watchers_count":980,"language":"Hack","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":128,"mirror_url":null,"open_issues_count":6,"forks":128,"open_issues":6,"watchers":980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/139"},"html":{"href":"https://github.com/facebook/xhp-lib/pull/139"},"issue":{"href":"https://api.github.com/repos/facebook/xhp-lib/issues/139"},"comments":{"href":"https://api.github.com/repos/facebook/xhp-lib/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/xhp-lib/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/xhp-lib/statuses/3f67fcf4573bb2e866c461eef6240a31d6ada086"}}}}