Re: [PATCH V6 3/8] libgpiod: Add rust wrapper crate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Sept 2022 at 13:07, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> I'm not talking about locking, this should be left to the user of the module.

Yeah, I get that.

> Can we force-drop an object still referenced by other objects in Rust?

No, AFAICT.

We can call drop(x) on an object, but as long as an reference to
it is out there, we won't end up calling the actualy drop() routine
for the object.

> This is what I had in mind - a small, dummy, cheap object inside the
> buffer that's created when reading into the buffer. Each even would
> reference it and then Rust would not allow us to drop it as long as
> there are references to it. Does it make sense? Is that possible?

I don't think so.

> Nah, just take the time off and rest. BTW, I'm starting at linaro next week. :)

Excellent, welcome buddy :)

--
Viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux