{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/45857384","id":45857384,"diff_hunk":"@@ -0,0 +1,865 @@\n+/**\n+ * Copyright (C) 2015 Typesafe Inc. <http://www.typesafe.com>\n+ */\n+package akka.stream.javadsl\n+\n+import akka.event.LoggingAdapter\n+import akka.japi.function\n+import akka.stream._\n+import akka.stream.impl.Stages.StageModule\n+import akka.stream.impl.ConstantFun\n+import akka.stream.stage.Stage\n+import scala.collection.immutable\n+import scala.collection.JavaConverters._\n+import scala.annotation.unchecked.uncheckedVariance\n+import scala.concurrent.Future\n+import scala.concurrent.duration.FiniteDuration\n+\n+/**\n+ * A “stream of streams” sub-flow of data elements, e.g. produced by `groupBy`.\n+ * SubFlows cannot contribute to the super-flow’s materialized value since they\n+ * are materialized later, during the runtime of the flow graph processing.\n+ */\n+class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]]) {\n+\n+  /** Converts this Flow to its Scala DSL counterpart */\n+  def asScala: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]] @uncheckedVariance = delegate\n+\n+  /**\n+   * Flatten the sub-flows back into the super-flow, performing a merge of the\n+   * given breadth. For concatenation of the flows use a breadth of 1 but beware\n+   * that this will lead to deadlocks if the sub-flows need to make progress\n+   * concurrently (as is generally the case when using `groupBy` on an unordered\n+   * input stream).\n+   *\n+   * WARNING: currently only a breadth of 1 is actually implemented! Beware of deadlocks!\n+   */\n+  // FIXME remove doc warning once fixed\n+  def mergeBack(breadth: Int): Flow[In, Out, Mat] =","path":"akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala","position":38,"original_position":38,"commit_id":"92b54b2b471b3ceea1ab494aa41e85226a4c0fd5","original_commit_id":"92b54b2b471b3ceea1ab494aa41e85226a4c0fd5","user":{"login":"viktorklang","id":10871,"avatar_url":"https://avatars.githubusercontent.com/u/10871?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorklang","html_url":"https://github.com/viktorklang","followers_url":"https://api.github.com/users/viktorklang/followers","following_url":"https://api.github.com/users/viktorklang/following{/other_user}","gists_url":"https://api.github.com/users/viktorklang/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorklang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorklang/subscriptions","organizations_url":"https://api.github.com/users/viktorklang/orgs","repos_url":"https://api.github.com/users/viktorklang/repos","events_url":"https://api.github.com/users/viktorklang/events{/privacy}","received_events_url":"https://api.github.com/users/viktorklang/received_events","type":"User","site_admin":false},"body":"It's not `maximumSubstreams` though. It's `maxConcurrentSubstreams`\n\nOn Wed, Nov 25, 2015 at 12:24 PM, Roland Kuhn <notifications@github.com>\nwrote:\n\n> In akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala\n> <https://github.com/akka/akka/pull/19006#discussion_r45855773>:\n>\n> > +class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]]) {\n> > +\n> > +  /** Converts this Flow to its Scala DSL counterpart */\n> > +  def asScala: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]] @uncheckedVariance = delegate\n> > +\n> > +  /**\n> > +   * Flatten the sub-flows back into the super-flow, performing a merge of the\n> > +   * given breadth. For concatenation of the flows use a breadth of 1 but beware\n> > +   * that this will lead to deadlocks if the sub-flows need to make progress\n> > +   * concurrently (as is generally the case when using `groupBy` on an unordered\n> > +   * input stream).\n> > +   *\n> > +   * WARNING: currently only a breadth of 1 is actually implemented! Beware of deadlocks!\n> > +   */\n> > +  // FIXME remove doc warning once fixed\n> > +  def mergeBack(breadth: Int): Flow[In, Out, Mat] =\n>\n> Okay, so here’s what I’ll do:\n>\n>    - remove the parameter and rename to mergeSubstreams\n>    - add concatSubstreams method\n>    - add maximumSubstreams parameter to groupBy\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/akka/akka/pull/19006/files#r45855773>.\n>\n\n\n\n-- \nCheers,\n√\n","created_at":"2015-11-25T11:45:15Z","updated_at":"2015-11-25T11:45:15Z","html_url":"https://github.com/akka/akka/pull/19006#discussion_r45857384","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/19006","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/45857384"},"html":{"href":"https://github.com/akka/akka/pull/19006#discussion_r45857384"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/19006"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/19006","id":51671851,"html_url":"https://github.com/akka/akka/pull/19006","diff_url":"https://github.com/akka/akka/pull/19006.diff","patch_url":"https://github.com/akka/akka/pull/19006.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/19006","number":19006,"state":"open","locked":false,"title":"groupBy shall emit SubFlow","user":{"login":"rkuhn","id":470469,"avatar_url":"https://avatars.githubusercontent.com/u/470469?v=3","gravatar_id":"","url":"https://api.github.com/users/rkuhn","html_url":"https://github.com/rkuhn","followers_url":"https://api.github.com/users/rkuhn/followers","following_url":"https://api.github.com/users/rkuhn/following{/other_user}","gists_url":"https://api.github.com/users/rkuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/rkuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkuhn/subscriptions","organizations_url":"https://api.github.com/users/rkuhn/orgs","repos_url":"https://api.github.com/users/rkuhn/repos","events_url":"https://api.github.com/users/rkuhn/events{/privacy}","received_events_url":"https://api.github.com/users/rkuhn/received_events","type":"User","site_admin":false},"body":"fixes #19005 \r\n\r\nwill squash/rebase after review","created_at":"2015-11-24T15:13:37Z","updated_at":"2015-11-25T11:45:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dce141c1c60b745e56d939ee449a80e095a5991c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/19006/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/19006/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/19006/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/92b54b2b471b3ceea1ab494aa41e85226a4c0fd5","head":{"label":"akka:wip-stream-of-streams-RK","ref":"wip-stream-of-streams-RK","sha":"92b54b2b471b3ceea1ab494aa41e85226a4c0fd5","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-11-25T04:52:32Z","pushed_at":"2015-11-25T09:57:33Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":177500,"stargazers_count":4742,"watchers_count":4742,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1422,"mirror_url":null,"open_issues_count":782,"forks":1422,"open_issues":782,"watchers":4742,"default_branch":"master"}},"base":{"label":"akka:release-2.3-dev","ref":"release-2.3-dev","sha":"fd70e53ad5b1cffe225f9b32e72c5b3f62121733","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-11-25T04:52:32Z","pushed_at":"2015-11-25T09:57:33Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":177500,"stargazers_count":4742,"watchers_count":4742,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1422,"mirror_url":null,"open_issues_count":782,"forks":1422,"open_issues":782,"watchers":4742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/19006"},"html":{"href":"https://github.com/akka/akka/pull/19006"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/19006"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/19006/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/19006/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/19006/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/92b54b2b471b3ceea1ab494aa41e85226a4c0fd5"}}}}