Hacker News new | ask | show | jobs
by masklinn 338 days ago
You can call an async function from a function that is not async by passing in a global runtime (/ event loop).

As a trivial example the main entry point in rust is never async. How’d you suppose you’d bootstrap the runtime that you’d eventually need.

This is pretty much like every other langage.

2 comments

and yet... there are libraries that were written twice, once for async and once for not.
Which should be a pretty big hint that you've misidentified the issue.
People in software really do have poor abilities to see the forest for the trees don't they lol