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
These would both require custom abstractions, e.g. file handles and stuff.
Perhaps it's useful to leverage the relevant abstractions in tokio and/or async-std since they have a similar lazy evaluation model. It would have to be a thin wrapper around those types that wraps the produced futures inside IO or wraps an IO inside a future. This would also tie in with the "plan" to make the code more usable with futures etc. The downside is that we'd be tied to a specific executor.
Also, if we do integrate with futures, that would mean that running an IO is probably going to require having an executor at all. This could be put behind a feature flag, though. Setting up the executor etc. can also be done inside IO::run, which would reinforce the "IO::run is the single entry point of your application" pattern, but it also interacts poorly with #[tokio::main] for example.
An alternative approach is to implement sync primitives first and then rewrite them to work with async Rust, possibly behind some feature flag. Thoughts?
The text was updated successfully, but these errors were encountered: