3 ms·
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 ru
by masklinn 1y 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.
- almostgotcaught 1y agoPeople in software really do have poor abilities to see the forest for the trees don't they lol
- throwawaymaths 1y agoand yet... there are libraries that were written twice, once for async and once for not.
- masklinn 1y agoWhich should be a pretty big hint that you've misidentified the issue.