Messages in this thread | | | Date | Wed, 9 Aug 2023 01:33:29 -0300 | Subject | Re: [RFC PATCH v1 5/5] rust: file: add `DeferredFdCloser` | From | Martin Rodriguez Reboredo <> |
| |
On 7/20/23 12:28, Alice Ryhl wrote: > This adds a new type called `DeferredFdCloser` that can be used to close > files by their fd in a way that is safe even if the file is currently > held using `fdget`. > > This is done by grabbing an extra refcount to the file and dropping it > in a task work once we return to userspace. > > See comments on `binder_do_fd_close` and commit `80cd795630d65` for > motivation.
Please provide links, at least for the doc comment.
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com> > --- > [...] > > +/// Helper used for closing file descriptors in a way that is safe even if the file is currently > +/// held using `fdget`. > +/// > +/// See comments on `binder_do_fd_close` and commit `80cd795630d65`.
Ditto.
> +pub struct DeferredFdCloser { > + inner: Box<DeferredFdCloserInner>, > +} > + > [...]
| |