title: SemigroupK operation to combine multiple Fibers
body: <p>Consider the following code:</p>
  <pre><code>import cats.effect._
  import cats.syntax.semigroupk._
  import scala.concurrent.ExecutionContext
  
  object TestFiber extends App {
    implicit val contextShift: ContextShift[IO] =
      IO.contextShift(ExecutionContext.global)
    implicit val timer: Timer[IO] = IO.timer(ExecutionContext.global)
    
    //prints before1
    IO(println(&quot;before1&quot;)).attempt.start.flatMap(_.join).unsafeRunSync()
    //prints before2
    IO(println(&quot;before2&quot;)).attempt.start.flatMap(_.join).unsafeRunSync()
    //prints what?
    (
      IO(println(&quot;before1&quot;)).attempt.start &lt;+&gt;
      IO(println(&quot;before2&quot;)).attempt.start
    ).flatMap(_.join).unsafeRunSync()
  
  }
  </code></pre>
  <p>As expected, the first and the second example prints <code>before1</code> and <code>before2</code> correspondingly.</p>
  <p>My expectation for the third example was that the resulting Fiber <code>IO[Fiber[IO, Either[Throwable, Unit]]]</code> produced by the <code>SemigroupK</code> operation is completed as soon as both of the <code>Fiber</code>s are completed so both <code>before1</code> and <code>before2</code> should have been printed.</p>
  <p>Unlikely</p>
  <pre><code>(
    IO(println(&quot;before1&quot;)).attempt.start &lt;+&gt;
    IO(println(&quot;before2&quot;)).attempt.start
  ).flatMap(_.join).unsafeRunSync()
  </code></pre>
  <p>prints the only <code>before1</code></p>
  <p>and</p>
  <pre><code>(
    IO(println(&quot;before2&quot;)).attempt.start &lt;+&gt;
    IO(println(&quot;before1&quot;)).attempt.start
  ).flatMap(_.join).unsafeRunSync()
  </code></pre>
  <p>prints the only <code>before2</code>.</p>
  <p>Is it the expected behavior? What is the correct way to get a <code>Fiber</code> that is completed as soon as both of the <code>Fiber</code>s completed?</p>
  <p>UPD: <code>Traverse</code>ing a <code>List</code> of <code>Fiber</code>s is an option, but it seems pretty cumbersome.</p>