<div dir="ltr"><div dir="ltr">Em ter., 9 de mai. de 2023 às 13:35, Remi Forax <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> escreveu:<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If we put everything together, we get the following code<br><br>
  try(var scope = new AsyncScope<Integer, RuntimeException>()) {<br>
      AsyncTask<Integer, RuntimeException> task = scope.async(() -> {<br>
          Thread.sleep(100);<br>
          return 10;<br>
      });<br>
      var task2 = scope.async(() -> {<br>
          Thread.sleep(300);<br>
          return 30;<br>
      });<br></blockquote><div><br></div><div><br></div><div>How would we use AsyncScope to concurrently call two services which return different data types?</div><div><br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>