{"action":"created","comment":{"url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/comments/152330631","pull_request_review_id":78175337,"id":152330631,"diff_hunk":"@@ -70,24 +71,39 @@ bool VisualNPipeline::processImageBlockingIfFull(size_t camera_index, const cv::\n   return false;\n }\n \n+bool VisualNPipeline::processImageNonBlockingDroppingOldestNFrameIfFull(\n+    size_t camera_index, const cv::Mat &image, int64_t timestamp,\n+    size_t max_output_queue_size) {\n+  CHECK_GE(max_output_queue_size, 1u);\n+\n+  bool result = false;\n+  std::unique_lock<std::mutex> lock(mutex_);\n+  if (completed_.size() >= max_output_queue_size) {\n+    completed_.erase(completed_.begin());\n+    result = true;\n+  }\n+  processImage(camera_index, image, timestamp);\n+  return result;\n+}\n+\n bool VisualNPipeline::getNextBlocking(std::shared_ptr<VisualNFrame>* nframe) {\n   CHECK_NOTNULL(nframe);\n-  while (!shutdown_) {\n-    std::unique_lock<std::mutex> lock(mutex_);\n-    if (completed_.empty()) {\n-      condition_not_empty_.wait(lock);\n-    }\n+  std::unique_lock<std::mutex> lock(mutex_);\n+  if (shutdown_) {\n+    return false;\n+  }\n+  if (completed_.empty()) {\n+    condition_not_empty_.wait(lock);","path":"aslam_cv_pipeline/src/visual-npipeline.cc","position":39,"original_position":39,"commit_id":"71f060e6c76eb6e8f9a4d43ccff518f5eadd8908","original_commit_id":"71f060e6c76eb6e8f9a4d43ccff518f5eadd8908","user":{"login":"schneith","id":5337083,"avatar_url":"https://avatars3.githubusercontent.com/u/5337083?v=4","gravatar_id":"","url":"https://api.github.com/users/schneith","html_url":"https://github.com/schneith","followers_url":"https://api.github.com/users/schneith/followers","following_url":"https://api.github.com/users/schneith/following{/other_user}","gists_url":"https://api.github.com/users/schneith/gists{/gist_id}","starred_url":"https://api.github.com/users/schneith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneith/subscriptions","organizations_url":"https://api.github.com/users/schneith/orgs","repos_url":"https://api.github.com/users/schneith/repos","events_url":"https://api.github.com/users/schneith/events{/privacy}","received_events_url":"https://api.github.com/users/schneith/received_events","type":"User","site_admin":false},"body":"wrap in while loop to protect against spurious wakeups","created_at":"2017-11-21T16:33:23Z","updated_at":"2017-11-21T16:34:32Z","html_url":"https://github.com/ethz-asl/aslam_cv2/pull/6#discussion_r152330631","pull_request_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/comments/152330631"},"html":{"href":"https://github.com/ethz-asl/aslam_cv2/pull/6#discussion_r152330631"},"pull_request":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6","id":153029613,"html_url":"https://github.com/ethz-asl/aslam_cv2/pull/6","diff_url":"https://github.com/ethz-asl/aslam_cv2/pull/6.diff","patch_url":"https://github.com/ethz-asl/aslam_cv2/pull/6.patch","issue_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/6","number":6,"state":"open","locked":false,"title":"Drop output queue element if max size reached","user":{"login":"magehrig","id":6841681,"avatar_url":"https://avatars1.githubusercontent.com/u/6841681?v=4","gravatar_id":"","url":"https://api.github.com/users/magehrig","html_url":"https://github.com/magehrig","followers_url":"https://api.github.com/users/magehrig/followers","following_url":"https://api.github.com/users/magehrig/following{/other_user}","gists_url":"https://api.github.com/users/magehrig/gists{/gist_id}","starred_url":"https://api.github.com/users/magehrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magehrig/subscriptions","organizations_url":"https://api.github.com/users/magehrig/orgs","repos_url":"https://api.github.com/users/magehrig/repos","events_url":"https://api.github.com/users/magehrig/events{/privacy}","received_events_url":"https://api.github.com/users/magehrig/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-16T12:37:11Z","updated_at":"2017-11-21T16:34:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"320ad3e2d2b7a9184bd3cc42e36f20e1e103f672","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6/commits","review_comments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6/comments","review_comment_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/6/comments","statuses_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/statuses/71f060e6c76eb6e8f9a4d43ccff518f5eadd8908","head":{"label":"ethz-asl:feature/dropping-visualnpipeline","ref":"feature/dropping-visualnpipeline","sha":"71f060e6c76eb6e8f9a4d43ccff518f5eadd8908","user":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"repo":{"id":103947833,"name":"aslam_cv2","full_name":"ethz-asl/aslam_cv2","owner":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethz-asl/aslam_cv2","description":null,"fork":false,"url":"https://api.github.com/repos/ethz-asl/aslam_cv2","forks_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/forks","keys_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/teams","hooks_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/hooks","issue_events_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/events{/number}","events_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/events","assignees_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/assignees{/user}","branches_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/branches{/branch}","tags_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/tags","blobs_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/statuses/{sha}","languages_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/languages","stargazers_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/stargazers","contributors_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/contributors","subscribers_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/subscribers","subscription_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/subscription","commits_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/contents/{+path}","compare_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/merges","archive_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/downloads","issues_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues{/number}","pulls_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls{/number}","milestones_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/milestones{/number}","notifications_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/labels{/name}","releases_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/releases{/id}","deployments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/deployments","created_at":"2017-09-18T14:13:12Z","updated_at":"2017-11-18T12:34:45Z","pushed_at":"2017-11-21T16:13:04Z","git_url":"git://github.com/ethz-asl/aslam_cv2.git","ssh_url":"git@github.com:ethz-asl/aslam_cv2.git","clone_url":"https://github.com/ethz-asl/aslam_cv2.git","svn_url":"https://github.com/ethz-asl/aslam_cv2","homepage":null,"size":1881,"stargazers_count":10,"watchers_count":10,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":10,"default_branch":"master"}},"base":{"label":"ethz-asl:master","ref":"master","sha":"81e4c9d1f8f05df4205d57a1d403986c33542864","user":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"repo":{"id":103947833,"name":"aslam_cv2","full_name":"ethz-asl/aslam_cv2","owner":{"login":"ethz-asl","id":475362,"avatar_url":"https://avatars0.githubusercontent.com/u/475362?v=4","gravatar_id":"","url":"https://api.github.com/users/ethz-asl","html_url":"https://github.com/ethz-asl","followers_url":"https://api.github.com/users/ethz-asl/followers","following_url":"https://api.github.com/users/ethz-asl/following{/other_user}","gists_url":"https://api.github.com/users/ethz-asl/gists{/gist_id}","starred_url":"https://api.github.com/users/ethz-asl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethz-asl/subscriptions","organizations_url":"https://api.github.com/users/ethz-asl/orgs","repos_url":"https://api.github.com/users/ethz-asl/repos","events_url":"https://api.github.com/users/ethz-asl/events{/privacy}","received_events_url":"https://api.github.com/users/ethz-asl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethz-asl/aslam_cv2","description":null,"fork":false,"url":"https://api.github.com/repos/ethz-asl/aslam_cv2","forks_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/forks","keys_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/teams","hooks_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/hooks","issue_events_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/events{/number}","events_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/events","assignees_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/assignees{/user}","branches_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/branches{/branch}","tags_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/tags","blobs_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/statuses/{sha}","languages_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/languages","stargazers_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/stargazers","contributors_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/contributors","subscribers_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/subscribers","subscription_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/subscription","commits_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/contents/{+path}","compare_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/merges","archive_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/downloads","issues_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues{/number}","pulls_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls{/number}","milestones_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/milestones{/number}","notifications_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/labels{/name}","releases_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/releases{/id}","deployments_url":"https://api.github.com/repos/ethz-asl/aslam_cv2/deployments","created_at":"2017-09-18T14:13:12Z","updated_at":"2017-11-18T12:34:45Z","pushed_at":"2017-11-21T16:13:04Z","git_url":"git://github.com/ethz-asl/aslam_cv2.git","ssh_url":"git@github.com:ethz-asl/aslam_cv2.git","clone_url":"https://github.com/ethz-asl/aslam_cv2.git","svn_url":"https://github.com/ethz-asl/aslam_cv2","homepage":null,"size":1881,"stargazers_count":10,"watchers_count":10,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6"},"html":{"href":"https://github.com/ethz-asl/aslam_cv2/pull/6"},"issue":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/6"},"comments":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/ethz-asl/aslam_cv2/statuses/71f060e6c76eb6e8f9a4d43ccff518f5eadd8908"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"schneith"}}