I have an asynchronous http4s client from which I get a collection of results, after running some requests. I want to check that this collection (a Seq[Task[Response]]
) has finished for all Task
objects, and that the Response
objects are in a specific state.
If I were using Future
instead of Task, I would do something like
val results: Seq[Future[Response]] = ...
Future.sequence(results).map(_.forall(_.customFunction.isSuccess))
Is there a way to achieve similar functionality using fs2.Task
instead? In my limited understanding, I assume at some point I will have to call unsafeRun
, which would block for each Task
in the collection.