You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently everything needs to be manually written as a state machine, so we can have proper concurrency. But there's already tech in Rust for being able to write relatively normal code, while the compiler turns it into a state machine: async.
I don't want to use normal async, i.e. tokio or async-std, for two reasons:
The executors are design to work for system IO, whereas I'm mostly gonna be waiting for events and (in-game) time passing, so there's a lot of unnecessary features.
That also makes them very no_std/WASM-unfriendly, whereas -- since I don't need them for IO -- a custom async executor could be much nicer about it.
The downside, of course, is that it's a lot of work, but I think it'd fit nicely into the engine.
The biggest issue I can foresee is the risk of intermixing asyncs. I have no idea how big the risk will be of someone trying to pass Tokio executors to me, or my futures to Tokio -- and that's a problem! It could be a very big problem! That said, I assume it's solvable, from how there's more than one async executor and people don't seem to have issues with accidentally intermixing them.
The text was updated successfully, but these errors were encountered:
Currently everything needs to be manually written as a state machine, so we can have proper concurrency. But there's already tech in Rust for being able to write relatively normal code, while the compiler turns it into a state machine:
async
.I don't want to use normal async, i.e.
tokio
orasync-std
, for two reasons:no_std
/WASM-unfriendly, whereas -- since I don't need them for IO -- a custom async executor could be much nicer about it.The downside, of course, is that it's a lot of work, but I think it'd fit nicely into the engine.
The biggest issue I can foresee is the risk of intermixing asyncs. I have no idea how big the risk will be of someone trying to pass Tokio executors to me, or my futures to Tokio -- and that's a problem! It could be a very big problem! That said, I assume it's solvable, from how there's more than one async executor and people don't seem to have issues with accidentally intermixing them.
The text was updated successfully, but these errors were encountered: