Is there a way to specify timeout for a `IO` effec...
# arrow
m
Is there a way to specify timeout for a
IO
effect? I checked quickly Cats
IO
and there is a
timeout
combinator. My use case is quite simple: I have two concurrent tasks whose results are combined with
parMapN
. I'd like to specify the timeout of the entire operation:
Copy code
val op1: IO<Any> = ...
val op2: IO<Any> = ...
fx {
  !NonBlocking.parMapN(op1, op2, ::Pair)
}