{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/95462501","pull_request_review_id":16018154,"id":95462501,"diff_hunk":"@@ -22,9 +22,8 @@\n #include <ripple/app/ledger/InboundLedgers.h>\n #include <ripple/app/ledger/LedgerMaster.h>\n #include <ripple/app/misc/LoadFeeTrack.h>\n-#include <ripple/core/ThreadEntry.h>\n #include <ripple/protocol/JsonFields.h>\n-#include <ripple/beast/core/Thread.h>\n+#include <ripple/beast/core/CurrentThreadName.h>","path":"src/ripple/app/ledger/impl/LedgerCleaner.cpp","position":7,"original_position":7,"commit_id":"dd11aac720a3ed85da20e0f7f2f1c508137c38c3","original_commit_id":"dd11aac720a3ed85da20e0f7f2f1c508137c38c3","user":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"body":"How strongly do you feel about this one?  I did a quick run at this and I'm getting compile errors out of MacOS-specific headers.  My suspicion is that the core.unity.cpp file is doing some favors for CurrentThreadName.cpp. I can get that straightened out, but it feels like there would probably be corresponding problems for Windows and Linux that would take me a while to get under control.","created_at":"2017-01-10T21:35:08Z","updated_at":"2017-01-10T21:35:08Z","html_url":"https://github.com/ripple/rippled/pull/1960#discussion_r95462501","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1960","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/95462501"},"html":{"href":"https://github.com/ripple/rippled/pull/1960#discussion_r95462501"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1960"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1960","id":100789632,"html_url":"https://github.com/ripple/rippled/pull/1960","diff_url":"https://github.com/ripple/rippled/pull/1960.diff","patch_url":"https://github.com/ripple/rippled/pull/1960.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1960","number":1960,"state":"open","locked":false,"title":"Remove beast::Thread (RIPD-1189):","user":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"body":"This pull request assumes that pull request #1954 or something like it survives code review. So ignore the first commit in this pull request. Assuming that #1954 is approved...\r\n\r\nAll uses of `beast::Thread` were previously removed from the code base, so `beast::Thread` is removed. One piece of `beast::Thread` needed to be preserved: the ability to set the current thread's name. So there's now a `beast::CurrentThreadName` that allows the current thread's name to be set and returned.\r\n\r\nThread naming is also cleaned up a bit. ThreadName.h and .cpp are removed since `beast::CurrentThreadName` does a better job. ThreadEntry is also removed, but its `terminateHandler()` is preserved in TerminateHandler.cpp. The revised `terminateHandler()` uses `beast::CurrentThreadName` to recover the name of the running thread.\r\n\r\nFinally, the `NO_LOG_UNHANDLED_EXCEPTIONS` #define is removed since it was discovered that the MacOS debugger preserves the stack of the original throw even if the` terminateHandler()` rethrows.\r\n\r\nIn order to test the code on MacOS I thew an unhandled exception using both a debug and a release build. I did that both in a debugger and running from the command line. On MacOS these tests had good results. Both the debug and release builds wrote the `terminateHandler()` output to the terminal window and to the log. When the unhandled exception occurred inside the debugger I got both a full stack trace to the unhandled throw (not just to the `terminateHandler()`) and the output from the `terminateHandler()`. This in both the debug and the release builds.\r\n\r\nI'm hoping that my reviewers, in addition to reviewing the code, can run similar tests on Linux and Windows. An easy way to cause an unhandled exception is to run the server after putting a `throw 5;` here: https://github.com/scottschurr/rippled/blob/rm-beast-thread/src/ripple/core/impl/Job.cpp#L83. But there are other choices. There may be a bit of back-and-forth as we get each platform to behave as well as possible.\r\n\r\nReviewers: @seelabs (Linux), @miguelportilla (Windows). Thanks.\r\n","created_at":"2017-01-10T00:31:03Z","updated_at":"2017-01-10T21:35:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c030574534f05b4238a86a68a3124dffb125ae8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1960/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1960/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1960/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/dd11aac720a3ed85da20e0f7f2f1c508137c38c3","head":{"label":"scottschurr:rm-beast-thread","ref":"rm-beast-thread","sha":"dd11aac720a3ed85da20e0f7f2f1c508137c38c3","user":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"repo":{"id":20703176,"name":"rippled","full_name":"scottschurr/rippled","owner":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scottschurr/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/scottschurr/rippled","forks_url":"https://api.github.com/repos/scottschurr/rippled/forks","keys_url":"https://api.github.com/repos/scottschurr/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scottschurr/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scottschurr/rippled/teams","hooks_url":"https://api.github.com/repos/scottschurr/rippled/hooks","issue_events_url":"https://api.github.com/repos/scottschurr/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/scottschurr/rippled/events","assignees_url":"https://api.github.com/repos/scottschurr/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/scottschurr/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/scottschurr/rippled/tags","blobs_url":"https://api.github.com/repos/scottschurr/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scottschurr/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scottschurr/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/scottschurr/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scottschurr/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/scottschurr/rippled/languages","stargazers_url":"https://api.github.com/repos/scottschurr/rippled/stargazers","contributors_url":"https://api.github.com/repos/scottschurr/rippled/contributors","subscribers_url":"https://api.github.com/repos/scottschurr/rippled/subscribers","subscription_url":"https://api.github.com/repos/scottschurr/rippled/subscription","commits_url":"https://api.github.com/repos/scottschurr/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/scottschurr/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/scottschurr/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/scottschurr/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/scottschurr/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/scottschurr/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scottschurr/rippled/merges","archive_url":"https://api.github.com/repos/scottschurr/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scottschurr/rippled/downloads","issues_url":"https://api.github.com/repos/scottschurr/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/scottschurr/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/scottschurr/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/scottschurr/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scottschurr/rippled/labels{/name}","releases_url":"https://api.github.com/repos/scottschurr/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/scottschurr/rippled/deployments","created_at":"2014-06-10T21:58:27Z","updated_at":"2016-01-15T01:44:41Z","pushed_at":"2017-01-09T23:42:04Z","git_url":"git://github.com/scottschurr/rippled.git","ssh_url":"git@github.com:scottschurr/rippled.git","clone_url":"https://github.com/scottschurr/rippled.git","svn_url":"https://github.com/scottschurr/rippled","homepage":"https://ripple.com","size":80064,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"ef23d7256294dca1d24c9fef4362f400ace3f6dc","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":2724167,"name":"rippled","full_name":"ripple/rippled","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/rippled","description":"Decentralized cryptocurrency blockchain daemon implementing the Ripple Consensus Ledger in C++","fork":false,"url":"https://api.github.com/repos/ripple/rippled","forks_url":"https://api.github.com/repos/ripple/rippled/forks","keys_url":"https://api.github.com/repos/ripple/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/rippled/teams","hooks_url":"https://api.github.com/repos/ripple/rippled/hooks","issue_events_url":"https://api.github.com/repos/ripple/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/rippled/events","assignees_url":"https://api.github.com/repos/ripple/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/rippled/tags","blobs_url":"https://api.github.com/repos/ripple/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/rippled/languages","stargazers_url":"https://api.github.com/repos/ripple/rippled/stargazers","contributors_url":"https://api.github.com/repos/ripple/rippled/contributors","subscribers_url":"https://api.github.com/repos/ripple/rippled/subscribers","subscription_url":"https://api.github.com/repos/ripple/rippled/subscription","commits_url":"https://api.github.com/repos/ripple/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/rippled/merges","archive_url":"https://api.github.com/repos/ripple/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/rippled/downloads","issues_url":"https://api.github.com/repos/ripple/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/rippled/labels{/name}","releases_url":"https://api.github.com/repos/ripple/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/ripple/rippled/deployments","created_at":"2011-11-07T04:40:15Z","updated_at":"2017-01-09T04:36:16Z","pushed_at":"2017-01-10T19:55:20Z","git_url":"git://github.com/ripple/rippled.git","ssh_url":"git@github.com:ripple/rippled.git","clone_url":"https://github.com/ripple/rippled.git","svn_url":"https://github.com/ripple/rippled","homepage":"https://ripple.com","size":79785,"stargazers_count":1199,"watchers_count":1199,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":380,"mirror_url":null,"open_issues_count":138,"forks":380,"open_issues":138,"watchers":1199,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1960"},"html":{"href":"https://github.com/ripple/rippled/pull/1960"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1960"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1960/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1960/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1960/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/dd11aac720a3ed85da20e0f7f2f1c508137c38c3"}}}}
{"actor":{"display_login":"scottschurr"}}