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
atrium_xrpc_server::stream::frames::Frame::try_from returns Result<Self, Box<dyn std::error::Error>>. The problem is that dyn std::error::Error is not Send, which means that if the result of Frame::try_from is potentially used across an await, the entire future is not Send.
To reproduce this, modify the firehose example to spawn the firehose running method instead of running it directly with #[tokio::main]. I tested this at commit 7d99ccd.
It would be helpful if the error type was Send + Sync + 'static, to also make it compatible with the anyhow crate. But that can be handled by rewriting the error as a string, whereas the future not being Send is more problematic for usage.
The text was updated successfully, but these errors were encountered:
Thank you for your report! I modified atrium-xrcp-server to use anyhow::Error and confirmed that it works with the following change in firehose example.
atrium_xrpc_server::stream::frames::Frame::try_from
returnsResult<Self, Box<dyn std::error::Error>>
. The problem is thatdyn std::error::Error
is notSend
, which means that if the result ofFrame::try_from
is potentially used across an await, the entire future is notSend
.To reproduce this, modify the firehose example to spawn the firehose running method instead of running it directly with
#[tokio::main]
. I tested this at commit 7d99ccd.It would be helpful if the error type was
Send + Sync + 'static
, to also make it compatible with theanyhow
crate. But that can be handled by rewriting the error as a string, whereas the future not beingSend
is more problematic for usage.The text was updated successfully, but these errors were encountered: