title: How to wait execution of a saga to finish in redux-saga?
body: <p>I have the following scenario:</p>
  
  <pre><code>export function* addCircle(circleApi, { payload }) {
      try {
          const response = yield apply(
              circleApi,
              circleApi.addCircle,
              [payload]
          );
  
          if (response.error_type) {
             yield put(addCircleFailedAction(response.error));
          } else {
              yield put(addCircleSucceededAction(response));
          }
      } catch (err) {
          console.error(err);
      }
  }
  
  export function* addTender(tenderApi, { payload }) {
      try {
         // NOTE: I want this to finish before continuing with rest of saga below.
         yield call(addCircleAction(payload.circlePayload));
  
         // Rest of saga removed for brevity.
      } catch (err) {
          console.error(err);
      }
  }
  </code></pre>
  
  <p>So, basically <code>addCircle</code> is making an API call, and depending on its success I call the appropriate redux action. Now, inside another saga I call the action responsible for <code>addCircle</code> saga, and I want it to finish execution before I continue with the rest of the saga. I tried to use call, but it basically doesn't wait for the <code>addCircle</code> saga to finish executing. Is there any way to wait for it? I call <code>addCircle</code> from inside my components and I didn't have the need to wait it, but in this specific instance I have to call it inside the saga, so I really need to wait for it to finish execution, change the state of the app, so that I can use the updated state in the rest of <code>addTender</code> saga. Any ideas?</p>