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
cable.rs currently uses the async-std runtime. While this was arguably the most approachable async codebase at the time when cable.rs was first written, it has largely been eclipsed in popularity by tokio.
If downstream users of cable.rs are building an application that uses the tokio runtime in some part of their stack, they end up having to run a second async runtime for async-std. This is obviously not ideal.
We can either refactor cable.rs to make it runtime agnostic, in which case it can run with either the async-std or tokio runtime, or we can switch to tokio instead.
A third possibility: make cable.rs entirely synchronous, removing the need for an async runtime. This would have the benefit of making the code much simpler, with little-to-no performance cost.
The length-prefixed-stream crate would need to be refactored. I'm not particularly knowledgeable when it comes to that code so I'd have to take a careful look first to ensure that a synchronous refactor is feasible.
I've completed an async-runtime agnostic refactor of length-prefixed-stream; will open a PR in due course. That should clear the way for the rest of the refactor :)
cable.rs
currently uses the async-std runtime. While this was arguably the most approachable async codebase at the time whencable.rs
was first written, it has largely been eclipsed in popularity by tokio.If downstream users of
cable.rs
are building an application that uses thetokio
runtime in some part of their stack, they end up having to run a second async runtime forasync-std
. This is obviously not ideal.We can either refactor
cable.rs
to make it runtime agnostic, in which case it can run with either theasync-std
ortokio
runtime, or we can switch totokio
instead.CC: @ahdinosaur
The text was updated successfully, but these errors were encountered: