{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/rclcpp/pulls/comments/240833649","pull_request_review_id":183956000,"id":240833649,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDgzMzY0OQ==","diff_hunk":"@@ -277,15 +311,121 @@ typedef void (* signal_handler_t)(int);\n signal_handler_t rclcpp::SignalHandler::old_signal_handler = 0;\n #endif\n \n-/// Mutex to protect g_sigint_guard_cond_handles\n-static std::mutex g_sigint_guard_cond_handles_mutex;\n-/// Guard conditions for interrupting the rmw implementation when the global interrupt signal fired.\n-static std::map<rcl_wait_set_t *, rcl_guard_condition_t> g_sigint_guard_cond_handles;\n+#if defined(_WIN32)\n+#include <windows.h>\n+#elif defined(__APPLE__)\n+#include <dispatch/dispatch.h>\n+#else  // posix\n+#include <semaphore.h>\n+#endif\n+\n+static std::atomic_bool g_wait_for_signal_is_setup = ATOMIC_VAR_INIT(false);\n+#if defined(_WIN32)\n+HANDLE g_signal_handler_sem;\n+#elif defined(__APPLE__)\n+dispatch_semaphore_t g_signal_handler_sem;\n+#else  // posix\n+sem_t g_signal_handler_sem;\n+#endif","path":"rclcpp/src/rclcpp/utilities.cpp","position":174,"original_position":174,"commit_id":"479d5ee35ac154160ed88184d8119e17f23cb0bb","original_commit_id":"479d5ee35ac154160ed88184d8119e17f23cb0bb","user":{"login":"wjwwood","id":100427,"node_id":"MDQ6VXNlcjEwMDQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/100427?v=4","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"body":"Again, lateral change, not really an improvement in my opinion, in fact kind of worse because you have initialize them outside of the class anyways (violates D.R.Y. more than necessary).","created_at":"2018-12-11T23:38:49Z","updated_at":"2018-12-11T23:38:49Z","html_url":"https://github.com/ros2/rclcpp/pull/607#discussion_r240833649","pull_request_url":"https://api.github.com/repos/ros2/rclcpp/pulls/607","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/comments/240833649"},"html":{"href":"https://github.com/ros2/rclcpp/pull/607#discussion_r240833649"},"pull_request":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/607"}},"in_reply_to_id":240590676},"pull_request":{"url":"https://api.github.com/repos/ros2/rclcpp/pulls/607","id":237560841,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NTYwODQx","html_url":"https://github.com/ros2/rclcpp/pull/607","diff_url":"https://github.com/ros2/rclcpp/pull/607.diff","patch_url":"https://github.com/ros2/rclcpp/pull/607.patch","issue_url":"https://api.github.com/repos/ros2/rclcpp/issues/607","number":607,"state":"open","locked":false,"title":"use signal safe synchronization with platform specific semaphores","user":{"login":"wjwwood","id":100427,"node_id":"MDQ6VXNlcjEwMDQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/100427?v=4","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"body":"This is a follow up of this comment: https://github.com/ros2/rclcpp/pull/605#discussion_r240439968\r\n\r\nThis is API and ABI neutral so we can merge it at anytime, but my preference would be after https://github.com/ros2/rclcpp/pull/605 but in for Crystal.","created_at":"2018-12-11T06:06:47Z","updated_at":"2018-12-11T23:38:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7565760e6dc3c61110ec05cec1664347847b5eff","assignee":{"login":"wjwwood","id":100427,"node_id":"MDQ6VXNlcjEwMDQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/100427?v=4","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"assignees":[{"login":"wjwwood","id":100427,"node_id":"MDQ6VXNlcjEwMDQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/100427?v=4","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"sloretz","id":4175662,"node_id":"MDQ6VXNlcjQxNzU2NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4175662?v=4","gravatar_id":"","url":"https://api.github.com/users/sloretz","html_url":"https://github.com/sloretz","followers_url":"https://api.github.com/users/sloretz/followers","following_url":"https://api.github.com/users/sloretz/following{/other_user}","gists_url":"https://api.github.com/users/sloretz/gists{/gist_id}","starred_url":"https://api.github.com/users/sloretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloretz/subscriptions","organizations_url":"https://api.github.com/users/sloretz/orgs","repos_url":"https://api.github.com/users/sloretz/repos","events_url":"https://api.github.com/users/sloretz/events{/privacy}","received_events_url":"https://api.github.com/users/sloretz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":120328829,"node_id":"MDU6TGFiZWwxMjAzMjg4Mjk=","url":"https://api.github.com/repos/ros2/rclcpp/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":180241234,"node_id":"MDU6TGFiZWwxODAyNDEyMzQ=","url":"https://api.github.com/repos/ros2/rclcpp/labels/in%20review","name":"in review","color":"388be2","default":false}],"milestone":{"url":"https://api.github.com/repos/ros2/rclcpp/milestones/3","html_url":"https://github.com/ros2/rclcpp/milestone/3","labels_url":"https://api.github.com/repos/ros2/rclcpp/milestones/3/labels","id":3549396,"node_id":"MDk6TWlsZXN0b25lMzU0OTM5Ng==","number":3,"title":"crystal","description":"The ROS 2 release \"Crystal Clemmys\".","creator":{"login":"sloretz","id":4175662,"node_id":"MDQ6VXNlcjQxNzU2NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4175662?v=4","gravatar_id":"","url":"https://api.github.com/users/sloretz","html_url":"https://github.com/sloretz","followers_url":"https://api.github.com/users/sloretz/followers","following_url":"https://api.github.com/users/sloretz/following{/other_user}","gists_url":"https://api.github.com/users/sloretz/gists{/gist_id}","starred_url":"https://api.github.com/users/sloretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloretz/subscriptions","organizations_url":"https://api.github.com/users/sloretz/orgs","repos_url":"https://api.github.com/users/sloretz/repos","events_url":"https://api.github.com/users/sloretz/events{/privacy}","received_events_url":"https://api.github.com/users/sloretz/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":4,"state":"open","created_at":"2018-08-06T15:11:26Z","updated_at":"2018-12-11T06:06:47Z","due_on":"2018-12-14T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ros2/rclcpp/pulls/607/commits","review_comments_url":"https://api.github.com/repos/ros2/rclcpp/pulls/607/comments","review_comment_url":"https://api.github.com/repos/ros2/rclcpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/rclcpp/issues/607/comments","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/479d5ee35ac154160ed88184d8119e17f23cb0bb","head":{"label":"ros2:wjwwood/signal_safe_notify","ref":"wjwwood/signal_safe_notify","sha":"479d5ee35ac154160ed88184d8119e17f23cb0bb","user":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":22737333,"node_id":"MDEwOlJlcG9zaXRvcnkyMjczNzMzMw==","name":"rclcpp","full_name":"ros2/rclcpp","private":false,"owner":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ros2/rclcpp","description":"rclcpp (ROS Client Library for C++)","fork":false,"url":"https://api.github.com/repos/ros2/rclcpp","forks_url":"https://api.github.com/repos/ros2/rclcpp/forks","keys_url":"https://api.github.com/repos/ros2/rclcpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rclcpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rclcpp/teams","hooks_url":"https://api.github.com/repos/ros2/rclcpp/hooks","issue_events_url":"https://api.github.com/repos/ros2/rclcpp/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rclcpp/events","assignees_url":"https://api.github.com/repos/ros2/rclcpp/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rclcpp/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rclcpp/tags","blobs_url":"https://api.github.com/repos/ros2/rclcpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rclcpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rclcpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rclcpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rclcpp/languages","stargazers_url":"https://api.github.com/repos/ros2/rclcpp/stargazers","contributors_url":"https://api.github.com/repos/ros2/rclcpp/contributors","subscribers_url":"https://api.github.com/repos/ros2/rclcpp/subscribers","subscription_url":"https://api.github.com/repos/ros2/rclcpp/subscription","commits_url":"https://api.github.com/repos/ros2/rclcpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rclcpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rclcpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rclcpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rclcpp/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rclcpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rclcpp/merges","archive_url":"https://api.github.com/repos/ros2/rclcpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rclcpp/downloads","issues_url":"https://api.github.com/repos/ros2/rclcpp/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rclcpp/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rclcpp/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rclcpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rclcpp/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rclcpp/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rclcpp/deployments","created_at":"2014-08-07T21:36:38Z","updated_at":"2018-12-07T06:12:42Z","pushed_at":"2018-12-11T22:37:58Z","git_url":"git://github.com/ros2/rclcpp.git","ssh_url":"git@github.com:ros2/rclcpp.git","clone_url":"https://github.com/ros2/rclcpp.git","svn_url":"https://github.com/ros2/rclcpp","homepage":"","size":1557,"stargazers_count":54,"watchers_count":54,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":59,"open_issues":83,"watchers":54,"default_branch":"master"}},"base":{"label":"ros2:hidmic/defer-signal-handling","ref":"hidmic/defer-signal-handling","sha":"9049cdf8eac07e7c00e60f800936747bbda12095","user":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":22737333,"node_id":"MDEwOlJlcG9zaXRvcnkyMjczNzMzMw==","name":"rclcpp","full_name":"ros2/rclcpp","private":false,"owner":{"login":"ros2","id":3979232,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzkyMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ros2/rclcpp","description":"rclcpp (ROS Client Library for C++)","fork":false,"url":"https://api.github.com/repos/ros2/rclcpp","forks_url":"https://api.github.com/repos/ros2/rclcpp/forks","keys_url":"https://api.github.com/repos/ros2/rclcpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rclcpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rclcpp/teams","hooks_url":"https://api.github.com/repos/ros2/rclcpp/hooks","issue_events_url":"https://api.github.com/repos/ros2/rclcpp/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rclcpp/events","assignees_url":"https://api.github.com/repos/ros2/rclcpp/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rclcpp/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rclcpp/tags","blobs_url":"https://api.github.com/repos/ros2/rclcpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rclcpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rclcpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rclcpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rclcpp/languages","stargazers_url":"https://api.github.com/repos/ros2/rclcpp/stargazers","contributors_url":"https://api.github.com/repos/ros2/rclcpp/contributors","subscribers_url":"https://api.github.com/repos/ros2/rclcpp/subscribers","subscription_url":"https://api.github.com/repos/ros2/rclcpp/subscription","commits_url":"https://api.github.com/repos/ros2/rclcpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rclcpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rclcpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rclcpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rclcpp/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rclcpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rclcpp/merges","archive_url":"https://api.github.com/repos/ros2/rclcpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rclcpp/downloads","issues_url":"https://api.github.com/repos/ros2/rclcpp/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rclcpp/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rclcpp/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rclcpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rclcpp/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rclcpp/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rclcpp/deployments","created_at":"2014-08-07T21:36:38Z","updated_at":"2018-12-07T06:12:42Z","pushed_at":"2018-12-11T22:37:58Z","git_url":"git://github.com/ros2/rclcpp.git","ssh_url":"git@github.com:ros2/rclcpp.git","clone_url":"https://github.com/ros2/rclcpp.git","svn_url":"https://github.com/ros2/rclcpp","homepage":"","size":1557,"stargazers_count":54,"watchers_count":54,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":59,"open_issues":83,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/607"},"html":{"href":"https://github.com/ros2/rclcpp/pull/607"},"issue":{"href":"https://api.github.com/repos/ros2/rclcpp/issues/607"},"comments":{"href":"https://api.github.com/repos/ros2/rclcpp/issues/607/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/607/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/607/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/rclcpp/statuses/479d5ee35ac154160ed88184d8119e17f23cb0bb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"wjwwood"}}