-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!Send
impl for various reader types
#256
Comments
I just stumbled on this. I don't understand why some things would have to be See also #180 (comment) // this is a TypedReader<BufferSegments<&[u8]>, ...>
let typed_reader = ...;
// the TypedReader is fine to send across await
while let Some(blah) = my_stream.next().await {
// but the *_capnp::foo::Reader isn't
// and I have to do this on every iteration
let foo = typed_reader.get().unwrap();
...
} |
Okay so #479 (comment) points out |
In my use case, my data source is (moral equivalent of) |
You can send the buffer over and construct the Reader on the other side |
Is there any reason why
capnp::struct_list::Reader
and similar types are notSend
? That makes it quite hard to use them in a async context, where each value of those iterator is later used to spawn of a future task.The text was updated successfully, but these errors were encountered: