title: How to wait until a bunch of calls ends to make another call
body: <p>I'm using <code>RxJava</code> and I know about <code>concat</code>, and I guess it does fit to me, because I want to finish first all of first call and then do the second one but I don't know how to implement it.</p>
  
  <p>I have this from now : </p>
  
  <pre><code>private fun assignAllAnswersToQuestion(questionId: Long) {
  
          answerListCreated.forEach { assignAnswerToQuestion(questionId, it.id) }
  
      }
  
      private fun assignAnswerToQuestion(questionId: Long, answerId: Long) {
          disposable = questionService.addAnswerToQuestion(questionId,answerId,MyUtils.getAccessTokenFromLocalStorage(context = this))
          .subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(
                  {
                      result -&gt; //Do nothing it should call the next one
  
                  },
                  { error -&gt; toast(error.message.toString())}
              )
      }
  </code></pre>
  
  <p>But then, once this is finished all of this <code>forEach</code> I'd like to do something like this : </p>
  
  <pre><code>private fun assignAllAnswersToQuestion(questionId: Long) {
  
     answerListCreated.forEach { assignAnswerToQuestion(questionId, it.id) 
     anotherCallHere(questionId) //Do it when the first forEach is finished!!
  
  }
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>Also, is a way to do it with coroutines this?</p>