3 ms·
> for it to bring benefits your whole codebase needs to be doing it (ingesting requests, db calls, web API calls). not really - the core of apps (usually no ou
by tcfhgj 14d ago
> for it to bring benefits your whole codebase needs to be doing it (ingesting requests, db calls, web API calls).
not really - the core of apps (usually no outside dependencies), and additions which solely rely onthe core, usually can be implemented without async entirely; async only comes into play once you add dependencies to file system, network and ui, but you don't need to make the core async for that. You might not call some functions in async code at all, because the function is used only for heavy computation which is best handled by dedicated threads to avoid stalling your io handling.
- vips7L 14d agoWhether you use async or blocking calls you’ll still want to keep IO at your edges otherwise you end up with tightly coupled spaghetti.