-
Notifications
You must be signed in to change notification settings - Fork 683
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
AioCb should work with refcounted buffers #575
Labels
Comments
asomers
added a commit
to asomers/nix
that referenced
this issue
Apr 14, 2017
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
asomers
added a commit
to asomers/nix
that referenced
this issue
Apr 15, 2017
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
asomers
added a commit
to asomers/nix
that referenced
this issue
Apr 15, 2017
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
asomers
added a commit
to asomers/nix
that referenced
this issue
Apr 16, 2017
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
asomers
added a commit
to asomers/nix
that referenced
this issue
Apr 16, 2017
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
bors bot
added a commit
that referenced
this issue
Apr 16, 2017
582: Add AioCb::from_boxed_slice r=posborne The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes #575
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
AioCb
structure contains a reference (actually just a PhantomData) to a slice. This makes it impossible to use in situations where the borrow checker can't prove that the slice will outlive theAioCb
, such as with Tokio. There should be a way to createAioCb
s that use reference counted buffers instead.The text was updated successfully, but these errors were encountered: