{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/comments/193540235","pull_request_review_id":126532241,"id":193540235,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzU0MDIzNQ==","diff_hunk":"@@ -48,66 +154,24 @@ void CALLBACK HandleAsyncQueueCallback(\n }\n \n \n-DWORD WINAPI game_thread_proc(LPVOID lpParam)\n-{\n-    async_queue_handle_t queue;\n-    uint32_t sharedAsyncQueueId = *((uint32_t*)lpParam);\n-    CreateSharedAsyncQueue(\n-        sharedAsyncQueueId,\n-        AsyncQueueDispatchMode::AsyncQueueDispatchMode_Manual,\n-        AsyncQueueDispatchMode::AsyncQueueDispatchMode_Manual,\n-        &queue);\n-\n-    bool stop = false;\n-    while (!stop)\n-    {\n-        // Game Work\n-        try\n-        {\n-            if (g_sampleInstance->m_testsStarted)\n-            {\n-                g_sampleInstance->HandleTests();\n-            }\n-        }\n-        catch (const std::exception& e)\n-        {\n-            g_sampleInstance->Log(\"[Error] \" + std::string(e.what()));\n-        }\n-\n-        // Dispatching async completions on game thread\n-        while(!IsAsyncQueueEmpty(queue, AsyncQueueCallbackType_Completion))\n-        {\n-            DispatchAsyncQueue(queue, AsyncQueueCallbackType_Completion, 0);\n-        }\n-    }\n-\n-    CloseAsyncQueue(queue);\n-    return 0;\n-}\n-\n-DWORD WINAPI work_thread_proc(LPVOID lpParam)\n+DWORD WINAPI BackgroundWorkThreadProc(LPVOID lpParam)\n {\n     HANDLE hEvents[2] =\n     {\n         g_workReadyHandle.get(),\n         g_stopRequestedHandle.get()\n     };\n \n-    async_queue_handle_t queue;\n-    uint32_t sharedAsyncQueueId = *((uint32_t*)lpParam);\n-    CreateSharedAsyncQueue(\n-        sharedAsyncQueueId,\n-        AsyncQueueDispatchMode::AsyncQueueDispatchMode_Manual,\n-        AsyncQueueDispatchMode::AsyncQueueDispatchMode_Manual,\n-        &queue);\n+    async_queue_handle_t queue = static_cast<async_queue_handle_t>(lpParam);\n \n     bool stop = false;\n     while (!stop)\n     {\n         DWORD dwResult = WaitForMultipleObjectsEx(2, hEvents, false, INFINITE, false);\n         switch (dwResult)\n         {\n-        case WAIT_OBJECT_0: // work ready\n+        case WAIT_OBJECT_0: \n+            // Background work is ready to be dispatched\n             DispatchAsyncQueue(queue, AsyncQueueCallbackType_Work, 0);\n             break;\n ","path":"Tests/LongHaulTestApp/AsyncIntegration.cpp","position":203,"original_position":203,"commit_id":"cc49f43604f9b9c48034a6d99abf17336edc3945","original_commit_id":"cc49f43604f9b9c48034a6d99abf17336edc3945","user":{"login":"jasonsandlin","id":18036245,"node_id":"MDQ6VXNlcjE4MDM2MjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/18036245?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonsandlin","html_url":"https://github.com/jasonsandlin","followers_url":"https://api.github.com/users/jasonsandlin/followers","following_url":"https://api.github.com/users/jasonsandlin/following{/other_user}","gists_url":"https://api.github.com/users/jasonsandlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonsandlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonsandlin/subscriptions","organizations_url":"https://api.github.com/users/jasonsandlin/orgs","repos_url":"https://api.github.com/users/jasonsandlin/repos","events_url":"https://api.github.com/users/jasonsandlin/events{/privacy}","received_events_url":"https://api.github.com/users/jasonsandlin/received_events","type":"User","site_admin":false},"body":"default will catch it, but i'll add this so its more clear\r\n\r\n---\r\nIn reply to: [193534220](https://github.com/Microsoft/xbox-live-api/pull/458#discussion_r193534220) [](ancestors = 193534220)","created_at":"2018-06-06T20:00:37Z","updated_at":"2018-06-06T20:00:38Z","html_url":"https://github.com/Microsoft/xbox-live-api/pull/458#discussion_r193540235","pull_request_url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/comments/193540235"},"html":{"href":"https://github.com/Microsoft/xbox-live-api/pull/458#discussion_r193540235"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458"}},"in_reply_to_id":193534220},"pull_request":{"url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458","id":193116992,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTE2OTky","html_url":"https://github.com/Microsoft/xbox-live-api/pull/458","diff_url":"https://github.com/Microsoft/xbox-live-api/pull/458.diff","patch_url":"https://github.com/Microsoft/xbox-live-api/pull/458.patch","issue_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/458","number":458,"state":"open","locked":false,"title":"Updating async integration","user":{"login":"jasonsandlin","id":18036245,"node_id":"MDQ6VXNlcjE4MDM2MjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/18036245?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonsandlin","html_url":"https://github.com/jasonsandlin","followers_url":"https://api.github.com/users/jasonsandlin/followers","following_url":"https://api.github.com/users/jasonsandlin/following{/other_user}","gists_url":"https://api.github.com/users/jasonsandlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonsandlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonsandlin/subscriptions","organizations_url":"https://api.github.com/users/jasonsandlin/orgs","repos_url":"https://api.github.com/users/jasonsandlin/repos","events_url":"https://api.github.com/users/jasonsandlin/events{/privacy}","received_events_url":"https://api.github.com/users/jasonsandlin/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-06T19:31:24Z","updated_at":"2018-06-06T20:00:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4905f4f7d6c49580b241f86954b3d2fe289d1af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458/commits","review_comments_url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458/comments","review_comment_url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/458/comments","statuses_url":"https://api.github.com/repos/Microsoft/xbox-live-api/statuses/cc49f43604f9b9c48034a6d99abf17336edc3945","head":{"label":"jasonsandlin:longhaul-pr","ref":"longhaul-pr","sha":"cc49f43604f9b9c48034a6d99abf17336edc3945","user":{"login":"jasonsandlin","id":18036245,"node_id":"MDQ6VXNlcjE4MDM2MjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/18036245?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonsandlin","html_url":"https://github.com/jasonsandlin","followers_url":"https://api.github.com/users/jasonsandlin/followers","following_url":"https://api.github.com/users/jasonsandlin/following{/other_user}","gists_url":"https://api.github.com/users/jasonsandlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonsandlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonsandlin/subscriptions","organizations_url":"https://api.github.com/users/jasonsandlin/orgs","repos_url":"https://api.github.com/users/jasonsandlin/repos","events_url":"https://api.github.com/users/jasonsandlin/events{/privacy}","received_events_url":"https://api.github.com/users/jasonsandlin/received_events","type":"User","site_admin":false},"repo":{"id":83844278,"node_id":"MDEwOlJlcG9zaXRvcnk4Mzg0NDI3OA==","name":"xbox-live-api","full_name":"jasonsandlin/xbox-live-api","owner":{"login":"jasonsandlin","id":18036245,"node_id":"MDQ6VXNlcjE4MDM2MjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/18036245?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonsandlin","html_url":"https://github.com/jasonsandlin","followers_url":"https://api.github.com/users/jasonsandlin/followers","following_url":"https://api.github.com/users/jasonsandlin/following{/other_user}","gists_url":"https://api.github.com/users/jasonsandlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonsandlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonsandlin/subscriptions","organizations_url":"https://api.github.com/users/jasonsandlin/orgs","repos_url":"https://api.github.com/users/jasonsandlin/repos","events_url":"https://api.github.com/users/jasonsandlin/events{/privacy}","received_events_url":"https://api.github.com/users/jasonsandlin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonsandlin/xbox-live-api","description":"This repo contains the Microsoft Xbox Live Service API (XSAPI) that enables game developers to access Xbox Live. To get access to the Xbox Live service, you can join the Xbox Live Creators Program at https://aka.ms/xblcp, or apply to the ID@Xbox program at http://www.xbox.com/en-us/Developers/id","fork":true,"url":"https://api.github.com/repos/jasonsandlin/xbox-live-api","forks_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/forks","keys_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/teams","hooks_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/hooks","issue_events_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/issues/events{/number}","events_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/events","assignees_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/assignees{/user}","branches_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/branches{/branch}","tags_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/tags","blobs_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/languages","stargazers_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/stargazers","contributors_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/contributors","subscribers_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/subscribers","subscription_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/subscription","commits_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/contents/{+path}","compare_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/merges","archive_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/downloads","issues_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/issues{/number}","pulls_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/labels{/name}","releases_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/releases{/id}","deployments_url":"https://api.github.com/repos/jasonsandlin/xbox-live-api/deployments","created_at":"2017-03-03T21:46:27Z","updated_at":"2018-06-05T22:21:23Z","pushed_at":"2018-06-06T19:17:14Z","git_url":"git://github.com/jasonsandlin/xbox-live-api.git","ssh_url":"git@github.com:jasonsandlin/xbox-live-api.git","clone_url":"https://github.com/jasonsandlin/xbox-live-api.git","svn_url":"https://github.com/jasonsandlin/xbox-live-api","homepage":"","size":6644,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"3c8614c84508f5918dbe33a0b103f17001ecedbd","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":74406109,"node_id":"MDEwOlJlcG9zaXRvcnk3NDQwNjEwOQ==","name":"xbox-live-api","full_name":"Microsoft/xbox-live-api","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/xbox-live-api","description":"This repo contains the C++ and WinRT version of the Microsoft Xbox Live Service API (XSAPI) that enables game developers to access Xbox Live. To get access to the Xbox Live service, you can join the Xbox Live Creators Program at https://aka.ms/xblcp, or apply to the ID@Xbox program at http://www.xbox.com/en-us/Developers/id","fork":false,"url":"https://api.github.com/repos/Microsoft/xbox-live-api","forks_url":"https://api.github.com/repos/Microsoft/xbox-live-api/forks","keys_url":"https://api.github.com/repos/Microsoft/xbox-live-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/xbox-live-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/xbox-live-api/teams","hooks_url":"https://api.github.com/repos/Microsoft/xbox-live-api/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/xbox-live-api/events","assignees_url":"https://api.github.com/repos/Microsoft/xbox-live-api/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/xbox-live-api/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/xbox-live-api/tags","blobs_url":"https://api.github.com/repos/Microsoft/xbox-live-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/xbox-live-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/xbox-live-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/xbox-live-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/xbox-live-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/xbox-live-api/languages","stargazers_url":"https://api.github.com/repos/Microsoft/xbox-live-api/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/xbox-live-api/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/xbox-live-api/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/xbox-live-api/subscription","commits_url":"https://api.github.com/repos/Microsoft/xbox-live-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/xbox-live-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/xbox-live-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/xbox-live-api/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/xbox-live-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/xbox-live-api/merges","archive_url":"https://api.github.com/repos/Microsoft/xbox-live-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/xbox-live-api/downloads","issues_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/xbox-live-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/xbox-live-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/xbox-live-api/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/xbox-live-api/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/xbox-live-api/deployments","created_at":"2016-11-21T21:11:23Z","updated_at":"2018-06-06T19:56:29Z","pushed_at":"2018-06-06T19:56:28Z","git_url":"git://github.com/Microsoft/xbox-live-api.git","ssh_url":"git@github.com:Microsoft/xbox-live-api.git","clone_url":"https://github.com/Microsoft/xbox-live-api.git","svn_url":"https://github.com/Microsoft/xbox-live-api","homepage":"","size":6678,"stargazers_count":112,"watchers_count":112,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":50,"open_issues":3,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458"},"html":{"href":"https://github.com/Microsoft/xbox-live-api/pull/458"},"issue":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/458"},"comments":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/458/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/pulls/458/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/xbox-live-api/statuses/cc49f43604f9b9c48034a6d99abf17336edc3945"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jasonsandlin"}}