title: Generate infinite parallel stream
body: <h2>Problem</h2>
  <p>Hi, I have a function where i going to return infinite stream of parallel (yes, it is much faster in that case) generated results. So obviously (or not) i used</p>
  <pre><code>Stream&lt;Something&gt; stream = Stream.generate(this::myGenerator).parallel()
  </code></pre>
  <p>It works, however ... it doesn't when i want to limit the result (everything is fine when the stream is sequential). I mean, it creates results when i make something like</p>
  <pre><code>stream.peek(System.out::println).limit(2).collect(Collectors.toList())
  </code></pre>
  <p>but even when <code>peek</code> output produces more than 10 elements, <code>collect</code> is still not finallized (generating is slow so those 10 can took even a minute)... and that is easy example. Actually, limiting those results is a <em>future</em> due the main expectation is to get only better than recent results until the user will kill the process (other case is to return first what i can make with throwing exception if nothing else will help [<code>findFirst</code> didn't, even when i had more elements on the console and no more results for about 30 sec]).</p>
  <h2>So, the question is...</h2>
  <p>how to copy with that? My idea was also to use RxJava, and there is another question - how to achieve similar result with that tool (or other).</p>
  <h3>Code sample</h3>
  <pre><code>public Stream&lt;Solution&gt; generateSolutions() {
       final Solution initialSolution = initialSolutionMaker.findSolution();
       return Stream.concat(
            Stream.of(initialSolution),
            Stream.generate(continuousSolutionMaker::findSolution)
      ).parallel();
  }
  
  new Solver(instance).generateSolutions()
      .map(Solution::getPurpose)
      .peek(System.out::println)
      .limit(5).collect(Collectors.toList());
  </code></pre>
  <p>Implementation of <code>findSolution</code> is not important.
  It has some side effect like adding to solutions repo (singleton, sych etc..), but nothing more.</p>