Does this mean that my suspend function should and will remain as suspend function until I need to do the side effects? Did I understand it correctly?
(Im just starting to learn arrow practically so I'm really sorry about this 😭)
Thank you so much though.
p
pakoito
03/17/2020, 7:55 PM
yes, so if you can fit something on a suspend function, do it
pakoito
03/17/2020, 7:56 PM
the moment that you need cancellation or threads return IO.
And, if you don’t need cancellation but you need threads,
IO#suspended()
can be called from any suspend function, like Raul explained.