Remix.run Logo
josephg 3 hours ago

This works a lot better in JavaScript, which is exactly this model - a single threaded executor with async await. The problem you talk about is solved with function colouring. Async functions are marked as such. In general, sync functions can’t call async functions. (Well, you can invoke them. You just can’t run them to completion before returning).

For all the complaints about function colouring, I’m glad JavaScript has them. A sync function becoming an async function is a breaking API change. This is much better than the situation in Python, where yield points are invisible.

pocksuppet 2 hours ago | parent [-]

Until every function is async.

nine_k an hour ago | parent [-]

If a function is not pure, it very likely has to be async.