4 ms·
The would say that asynchronous methods are mostly about orchestration and side-effects and non-asynchronous ones about computations. If your computation code
by CuriousSkeptic 5y ago
The would say that asynchronous methods are mostly about orchestration and side-effects and non-asynchronous ones about computations.
If your computation code reach out to fetch data or trigger side-effects I’d take that as a sign of it being badly factored. Try to push the async parts up the stack to an orchestration layer, and keep the computation code “pure”
- galaxyLogic 5y agoBut sometimes what needs to be fetched is determined by a "computation". And a computation might take a long time. So I'm not sure if it's always clear what should be the perfect factoring.