{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/system_tests/pulls/comments/44692581","id":44692581,"diff_hunk":"@@ -0,0 +1,197 @@\n+// Copyright 2015 Open Source Robotics Foundation, Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0 //\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#include \"gtest/gtest.h\"\n+\n+#include \"rclcpp/rclcpp.hpp\"\n+#include \"rclcpp/executors.hpp\"\n+\n+#include \"test_rclcpp/msg/u_int32.hpp\"\n+#include \"test_rclcpp/srv/add_two_ints.hpp\"\n+\n+#ifdef RMW_IMPLEMENTATION\n+# define CLASSNAME_(NAME, SUFFIX) NAME ## __ ## SUFFIX\n+# define CLASSNAME(NAME, SUFFIX) CLASSNAME_(NAME, SUFFIX)\n+#else\n+# define CLASSNAME(NAME, SUFFIX) NAME\n+#endif\n+\n+static inline void multi_consumer_pub_sub_test(bool intra_process) {\n+  rclcpp::init(0, nullptr);","path":"test_rclcpp/test/test_multithreaded.cpp","position":30,"original_position":30,"commit_id":"fa67b8b22e53351efb27ea364a450775d8548fa5","original_commit_id":"fa67b8b22e53351efb27ea364a450775d8548fa5","user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"body":"Both tests `multi_consumer_single_producer` and `multi_consumer_intraprocess` are calling this function and therefore `init`.\r\n\r\nCurrently we don't have a function symmetric to `init`. So I can't recommend anything but calling it only once in the main.","created_at":"2015-11-12T18:14:03Z","updated_at":"2015-11-12T18:14:03Z","html_url":"https://github.com/ros2/system_tests/pull/72#discussion_r44692581","pull_request_url":"https://api.github.com/repos/ros2/system_tests/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/comments/44692581"},"html":{"href":"https://github.com/ros2/system_tests/pull/72#discussion_r44692581"},"pull_request":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/ros2/system_tests/pulls/72","id":50465781,"html_url":"https://github.com/ros2/system_tests/pull/72","diff_url":"https://github.com/ros2/system_tests/pull/72.diff","patch_url":"https://github.com/ros2/system_tests/pull/72.patch","issue_url":"https://api.github.com/repos/ros2/system_tests/issues/72","number":72,"state":"open","locked":false,"title":"Test for multithreaded execution","user":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"body":"In progress. I'd like to clean up some technical debt (like exposing the QoS profile to services and clients) before this gets merged.\r\n\r\nThe good news is that I didn't find any major bugs or deadlock in the current implementation of MultiThreadedExecutor! If/when I implement multi-threaded spin_some and spin_until_future_complete (?), hopefully this test will come in handy.\r\n\r\nThis PR tests MultiThreadedExecutor `spin` and `spin_some` in three test cases:\r\n\r\n1. Create 1 publisher and 2*N subscribers where N is the hardware concurrency of the machine, in an attempt to saturate the execution with work that must be done.\r\n2. Same as above, but with intraprocess turned on.\r\n3. Create 1 service and 2*N clients.","created_at":"2015-11-12T02:47:22Z","updated_at":"2015-11-12T18:14:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1720f0d5908c7a2e80fb949728b4cb36040074da","assignee":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ros2/system_tests/pulls/72/commits","review_comments_url":"https://api.github.com/repos/ros2/system_tests/pulls/72/comments","review_comment_url":"https://api.github.com/repos/ros2/system_tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/system_tests/issues/72/comments","statuses_url":"https://api.github.com/repos/ros2/system_tests/statuses/fa67b8b22e53351efb27ea364a450775d8548fa5","head":{"label":"ros2:multithreaded","ref":"multithreaded","sha":"fa67b8b22e53351efb27ea364a450775d8548fa5","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","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":34927706,"name":"system_tests","full_name":"ros2/system_tests","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","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},"private":false,"html_url":"https://github.com/ros2/system_tests","description":"","fork":false,"url":"https://api.github.com/repos/ros2/system_tests","forks_url":"https://api.github.com/repos/ros2/system_tests/forks","keys_url":"https://api.github.com/repos/ros2/system_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/system_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/system_tests/teams","hooks_url":"https://api.github.com/repos/ros2/system_tests/hooks","issue_events_url":"https://api.github.com/repos/ros2/system_tests/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/system_tests/events","assignees_url":"https://api.github.com/repos/ros2/system_tests/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/system_tests/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/system_tests/tags","blobs_url":"https://api.github.com/repos/ros2/system_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/system_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/system_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/system_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/system_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/system_tests/languages","stargazers_url":"https://api.github.com/repos/ros2/system_tests/stargazers","contributors_url":"https://api.github.com/repos/ros2/system_tests/contributors","subscribers_url":"https://api.github.com/repos/ros2/system_tests/subscribers","subscription_url":"https://api.github.com/repos/ros2/system_tests/subscription","commits_url":"https://api.github.com/repos/ros2/system_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/system_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/system_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/system_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/system_tests/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/system_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/system_tests/merges","archive_url":"https://api.github.com/repos/ros2/system_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/system_tests/downloads","issues_url":"https://api.github.com/repos/ros2/system_tests/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/system_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/system_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/system_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/system_tests/labels{/name}","releases_url":"https://api.github.com/repos/ros2/system_tests/releases{/id}","created_at":"2015-05-01T22:50:12Z","updated_at":"2015-06-12T21:16:59Z","pushed_at":"2015-11-12T02:48:03Z","git_url":"git://github.com/ros2/system_tests.git","ssh_url":"git@github.com:ros2/system_tests.git","clone_url":"https://github.com/ros2/system_tests.git","svn_url":"https://github.com/ros2/system_tests","homepage":null,"size":1324,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"ros2:master","ref":"master","sha":"85bc2813f7f403cbcff6a0c95ea221c70ee384d6","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","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":34927706,"name":"system_tests","full_name":"ros2/system_tests","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","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},"private":false,"html_url":"https://github.com/ros2/system_tests","description":"","fork":false,"url":"https://api.github.com/repos/ros2/system_tests","forks_url":"https://api.github.com/repos/ros2/system_tests/forks","keys_url":"https://api.github.com/repos/ros2/system_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/system_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/system_tests/teams","hooks_url":"https://api.github.com/repos/ros2/system_tests/hooks","issue_events_url":"https://api.github.com/repos/ros2/system_tests/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/system_tests/events","assignees_url":"https://api.github.com/repos/ros2/system_tests/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/system_tests/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/system_tests/tags","blobs_url":"https://api.github.com/repos/ros2/system_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/system_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/system_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/system_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/system_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/system_tests/languages","stargazers_url":"https://api.github.com/repos/ros2/system_tests/stargazers","contributors_url":"https://api.github.com/repos/ros2/system_tests/contributors","subscribers_url":"https://api.github.com/repos/ros2/system_tests/subscribers","subscription_url":"https://api.github.com/repos/ros2/system_tests/subscription","commits_url":"https://api.github.com/repos/ros2/system_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/system_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/system_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/system_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/system_tests/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/system_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/system_tests/merges","archive_url":"https://api.github.com/repos/ros2/system_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/system_tests/downloads","issues_url":"https://api.github.com/repos/ros2/system_tests/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/system_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/system_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/system_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/system_tests/labels{/name}","releases_url":"https://api.github.com/repos/ros2/system_tests/releases{/id}","created_at":"2015-05-01T22:50:12Z","updated_at":"2015-06-12T21:16:59Z","pushed_at":"2015-11-12T02:48:03Z","git_url":"git://github.com/ros2/system_tests.git","ssh_url":"git@github.com:ros2/system_tests.git","clone_url":"https://github.com/ros2/system_tests.git","svn_url":"https://github.com/ros2/system_tests","homepage":null,"size":1324,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/72"},"html":{"href":"https://github.com/ros2/system_tests/pull/72"},"issue":{"href":"https://api.github.com/repos/ros2/system_tests/issues/72"},"comments":{"href":"https://api.github.com/repos/ros2/system_tests/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/system_tests/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/system_tests/statuses/fa67b8b22e53351efb27ea364a450775d8548fa5"}}}}