{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/ray/pulls/comments/72390412","id":72390412,"diff_hunk":"@@ -3,16 +3,138 @@\n #include <random>\n #include <thread>\n #include <chrono>\n+#include <sstream>\n \n #include \"utils.h\"\n \n+#ifndef NDEBUG\n+template<>\n+class SchedulerService::MySynchronizedPtr<void> {\n+  SchedulerService* me_;\n+  size_t order_;\n+  unsigned int line_number_;\n+  static unsigned long long get_thread_id() {\n+    unsigned long long id = 0;\n+    std::stringstream ss;\n+    ss << std::this_thread::get_id();\n+    ss >> id;\n+    // This seems to fail on a Mac. I unfortunately can't find a workaround.","path":"src/scheduler.cc","position":19,"original_position":19,"commit_id":"341e08b6a993bddc7fea658ba022fadd83886373","original_commit_id":"341e08b6a993bddc7fea658ba022fadd83886373","user":{"login":"mehrdadn","id":523212,"avatar_url":"https://avatars.githubusercontent.com/u/523212?v=3","gravatar_id":"","url":"https://api.github.com/users/mehrdadn","html_url":"https://github.com/mehrdadn","followers_url":"https://api.github.com/users/mehrdadn/followers","following_url":"https://api.github.com/users/mehrdadn/following{/other_user}","gists_url":"https://api.github.com/users/mehrdadn/gists{/gist_id}","starred_url":"https://api.github.com/users/mehrdadn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehrdadn/subscriptions","organizations_url":"https://api.github.com/users/mehrdadn/orgs","repos_url":"https://api.github.com/users/mehrdadn/repos","events_url":"https://api.github.com/users/mehrdadn/events{/privacy}","received_events_url":"https://api.github.com/users/mehrdadn/received_events","type":"User","site_admin":false},"body":"I have -- see the first post in this PR.","created_at":"2016-07-27T07:12:49Z","updated_at":"2016-07-27T07:12:49Z","html_url":"https://github.com/amplab/ray/pull/262#discussion_r72390412","pull_request_url":"https://api.github.com/repos/amplab/ray/pulls/262","_links":{"self":{"href":"https://api.github.com/repos/amplab/ray/pulls/comments/72390412"},"html":{"href":"https://github.com/amplab/ray/pull/262#discussion_r72390412"},"pull_request":{"href":"https://api.github.com/repos/amplab/ray/pulls/262"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/ray/pulls/262","id":77432798,"html_url":"https://github.com/amplab/ray/pull/262","diff_url":"https://github.com/amplab/ray/pull/262.diff","patch_url":"https://github.com/amplab/ray/pull/262.patch","issue_url":"https://api.github.com/repos/amplab/ray/issues/262","number":262,"state":"open","locked":false,"title":"Checked locking","user":{"login":"mehrdadn","id":523212,"avatar_url":"https://avatars.githubusercontent.com/u/523212?v=3","gravatar_id":"","url":"https://api.github.com/users/mehrdadn","html_url":"https://github.com/mehrdadn","followers_url":"https://api.github.com/users/mehrdadn/followers","following_url":"https://api.github.com/users/mehrdadn/following{/other_user}","gists_url":"https://api.github.com/users/mehrdadn/gists{/gist_id}","starred_url":"https://api.github.com/users/mehrdadn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehrdadn/subscriptions","organizations_url":"https://api.github.com/users/mehrdadn/orgs","repos_url":"https://api.github.com/users/mehrdadn/repos","events_url":"https://api.github.com/users/mehrdadn/events{/privacy}","received_events_url":"https://api.github.com/users/mehrdadn/received_events","type":"User","site_admin":false},"body":"Ready for merge. Note that these checks don't work on Mac because for some reason the thread ID I get is zero for all threads. Hence, they are disabled for thread IDs that are zero.","created_at":"2016-07-14T10:24:44Z","updated_at":"2016-07-27T07:12:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a97f97c2140c1e06a9e90dbf9cdd8ef14ae0a13","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/amplab/ray/pulls/262/commits","review_comments_url":"https://api.github.com/repos/amplab/ray/pulls/262/comments","review_comment_url":"https://api.github.com/repos/amplab/ray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/ray/issues/262/comments","statuses_url":"https://api.github.com/repos/amplab/ray/statuses/341e08b6a993bddc7fea658ba022fadd83886373","head":{"label":"amplab:lock_order","ref":"lock_order","sha":"341e08b6a993bddc7fea658ba022fadd83886373","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":51269228,"name":"ray","full_name":"amplab/ray","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/ray","description":"This is an experimental distributed execution engine","fork":false,"url":"https://api.github.com/repos/amplab/ray","forks_url":"https://api.github.com/repos/amplab/ray/forks","keys_url":"https://api.github.com/repos/amplab/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/ray/teams","hooks_url":"https://api.github.com/repos/amplab/ray/hooks","issue_events_url":"https://api.github.com/repos/amplab/ray/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/ray/events","assignees_url":"https://api.github.com/repos/amplab/ray/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/ray/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/ray/tags","blobs_url":"https://api.github.com/repos/amplab/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/ray/languages","stargazers_url":"https://api.github.com/repos/amplab/ray/stargazers","contributors_url":"https://api.github.com/repos/amplab/ray/contributors","subscribers_url":"https://api.github.com/repos/amplab/ray/subscribers","subscription_url":"https://api.github.com/repos/amplab/ray/subscription","commits_url":"https://api.github.com/repos/amplab/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/ray/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/ray/merges","archive_url":"https://api.github.com/repos/amplab/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/ray/downloads","issues_url":"https://api.github.com/repos/amplab/ray/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/ray/labels{/name}","releases_url":"https://api.github.com/repos/amplab/ray/releases{/id}","deployments_url":"https://api.github.com/repos/amplab/ray/deployments","created_at":"2016-02-07T22:18:40Z","updated_at":"2016-07-23T20:07:29Z","pushed_at":"2016-07-27T06:53:04Z","git_url":"git://github.com/amplab/ray.git","ssh_url":"git@github.com:amplab/ray.git","clone_url":"https://github.com/amplab/ray.git","svn_url":"https://github.com/amplab/ray","homepage":"","size":992,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":41,"forks":2,"open_issues":41,"watchers":7,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"aa2f618ab73476093d05b95096ab42209f011bc1","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":51269228,"name":"ray","full_name":"amplab/ray","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/ray","description":"This is an experimental distributed execution engine","fork":false,"url":"https://api.github.com/repos/amplab/ray","forks_url":"https://api.github.com/repos/amplab/ray/forks","keys_url":"https://api.github.com/repos/amplab/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/ray/teams","hooks_url":"https://api.github.com/repos/amplab/ray/hooks","issue_events_url":"https://api.github.com/repos/amplab/ray/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/ray/events","assignees_url":"https://api.github.com/repos/amplab/ray/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/ray/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/ray/tags","blobs_url":"https://api.github.com/repos/amplab/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/ray/languages","stargazers_url":"https://api.github.com/repos/amplab/ray/stargazers","contributors_url":"https://api.github.com/repos/amplab/ray/contributors","subscribers_url":"https://api.github.com/repos/amplab/ray/subscribers","subscription_url":"https://api.github.com/repos/amplab/ray/subscription","commits_url":"https://api.github.com/repos/amplab/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/ray/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/ray/merges","archive_url":"https://api.github.com/repos/amplab/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/ray/downloads","issues_url":"https://api.github.com/repos/amplab/ray/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/ray/labels{/name}","releases_url":"https://api.github.com/repos/amplab/ray/releases{/id}","deployments_url":"https://api.github.com/repos/amplab/ray/deployments","created_at":"2016-02-07T22:18:40Z","updated_at":"2016-07-23T20:07:29Z","pushed_at":"2016-07-27T06:53:04Z","git_url":"git://github.com/amplab/ray.git","ssh_url":"git@github.com:amplab/ray.git","clone_url":"https://github.com/amplab/ray.git","svn_url":"https://github.com/amplab/ray","homepage":"","size":992,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":41,"forks":2,"open_issues":41,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/ray/pulls/262"},"html":{"href":"https://github.com/amplab/ray/pull/262"},"issue":{"href":"https://api.github.com/repos/amplab/ray/issues/262"},"comments":{"href":"https://api.github.com/repos/amplab/ray/issues/262/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/ray/pulls/262/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/ray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/ray/pulls/262/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/ray/statuses/341e08b6a993bddc7fea658ba022fadd83886373"}}}}
{"actor":{"display_login":"mehrdadn"}}