eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
569 stars 26 forks source link

Refactor `IpcCapable` trait #162

Closed elfenpiff closed 6 months ago

elfenpiff commented 6 months ago

Brief feature description

Currently, the iceoryx2_bb_posix::IpcCapable trait has too much responsibility for the layer it is located on. It shall not perform reference counting to ensure lifetime - what if the process crashes and the ref-count is unusable. Furthermore, some resources shall persist even when no process is actively using them.

The solution is an HandleStorage that holds the handle, the handle itself destroys the resource in drop and the storage tracks if it is IpcCapable or not.